2025-10-22  Philippe Troin  <phil@fifi.org>

	* NEWS:
	* README.md:
	* tdiff.spec:
	Bbump version to 0.8.8, update changelog.

	* configure.ac: Bump version to 0.8.8, update copyright.

	* tests/test.lib.sh (acl_filter, xid_filter, xtime_filter): Use
	plain regexes, not extended ones (not supported on MacOSX).
	This partially reverts 2dc1bd34ecdac92a32234342ad4d53034a7887da.

	* tdiff.c (report_missing_file): Do not report an error when an
	excluded file is missing.
	(show_version): Update copyright.

2024-10-15  Philippe Troin  <phil@fifi.org>

	* genhash.c (GH_INITIAL_SIZE): Removed dead/unused constant.

2024-09-10  Philippe Troin  <phil@fifi.org>

	* README.md: Include submodules when cloning from github.

	* tdiff.spec (URL): Use %{name}.

	* Makefile.am (dist_doc_DATA): Add ChangeLog.

2024-02-06  Philippe Troin  <phil@fifi.org>
	* tdiff.c (reportMissing): Rename to report_missing.
	(reportMissingAcl): Rename to report_missing_acl.
	(reportMissingFile): Rename to report_missing_file.
	(reportMissingHardLink): Rename to report_missing_hard_link.
	(reportMissingXattr): Rename to report_missing_xattr.
	(getXattrList): Rename to get_xattr_list.
	(getXattr): Rename to get_xattr.
	(compareXattrs): Rename to compare_xattrs.
	(dropAclXattrs): Rename to drop_acl_xattrs.
	(getAcl): Rename to get_acl.
	(getAclList): Rename to get_acl_list.
	(reportMissingAcl): Rename to report_missing_acl.
	(compareAcls): Rename to compare_acls.
	(diffacl): Rename to diff_acl.
	(openFile): Rename to open_path.
	(getDirList): Rename to get_dir_list.
	(compareFileEntries): Rename to compare_directories.
	(getFileType): Rename get_file_type.
	(formatTime): Rename to format_time.
	(reportTimeDiscrepancy): Rename to report_time_discrepancy
	(cmpFiles): Rename to compare_files.
	(printopts): Rename to print_options.
	(execprocess): Rename to exec_process.
	(applyPresets): Rename to apply_preset.
	(aclCompareClientData_t): Rename to acl_compare_client_data_t.
	(aclCompareClientData_s): Rename to acl_compare_client_data_s.
	(report_missing, report_missing_xattr, compare_xattrs)
	(report_missing_acl, compare_acls, diff_acl)
	(report_missing_file, compare_directories, dodiff): Rename
	clientData to client_data.
	(report_missing_acl, compare_acls): Rename commonClientData to
	common_client_data.
	(options_t): Rename verbosityLevel to verbosity_level.
	(get_xattr_list, get_xattr, xreadlink): Rename bufSize to buf_size.
	(format_time): Rename obufsize to buf_size.
	(apply_preset): Rename presetLevel to preset_level.
	(main): Rename presetNames to preset_names.
	(get_xattr_list): Rename rSize to read_size;
	(get_xattr): Rename retSize to returned_size.

	* tdiff.c (xperror, getXattrList, getXattr, compareXattrs)
	(dropAclXattrs, getAclList, reportMissingAcl, compareAcls)
	(diffacl, getDirList, getFileType, get_terminal_width)
	(print_list, show_version, show_help, get_octal_arg, printopts)
	(pconcat, execprocess, xreadlink, dodiff): Make static.

	* tdiff.c (openFile): Factor out from multiple locations where a
	file is opened.
	(getDirList, cmpFiles, xreadlink): Use per-file file descriptor to
	have a single open/close per pair of compared files.
	(dodiff): Only open every file at most once.

	* have_subsecond_times.c (ATTRIBUTE_UNUSED): Removed unused macro.

	* make_door.c (UNUSED): New macro to mark an unused variable or
	parameter.
	(ATTRIBUTE_UNUSED): Remove.
	(door_proc): ATTRIBUTE_UNUSED -> UNUSED.

	* tdiff.c (UNUSED): New macro to mark an unused variable or
	parameter.
	(ATTRIBUTE_UNUSED): Remove.
	(compareAcls, compareFileEntries): ATTRIBUTE_UNUSED -> UNUSED.

	* tdiff.c (xreadlink): Off-by-one in xreadlink which could lead to
	memory corruption for symbolic links of length of a multiple of
	1024. Unlikely to be a problem as most filesystems limit symbolic
	link sizes to lower than 1024.

	* tdiff.1: Update Copyright notice.

2024-01-30  Philippe Troin  <phil@fifi.org>

	* NEWS:
	* README.md:
	* tdiff.spec:
	Add changelog, update to 0.8.7.
	Fix typos.
	Drop Travis CI badges.

	* configure.ac: Updated to 0.8.7.

	* tdiff.1: Update with new features shown in --version.

	* m4/fi_check_shell_functions_dir.m4
	(FI_CHECK_SHELL_FUNCTIONS_DIR): Modernize (AC_HELP_STRING ->
	AS_HELP_STRING).

	* configure.ac (AC_CONFIG_HEADERS): Quote properly.

	* tests/test.lib.sh: Skip time and block checks if configured.

	* Makefile.am (AM_TESTS_ENVIRONMENT): Pass down
	ENABLE_BLOCK_CHECKS and ENABLE_TIME_CHECKS to test environment.

	* configure.ac (--enable/disable-block-checks)
	(--enable/disable-time-checks): Add toggles for disabling or
	enabling part of the regressions related to time and file system
	blocks. Auto-detect defaults for Linux (disable time checks on
	s390x, aarch64, ppc64le; disable block checks on ppc64le).

	* tdiff.spec (%files): Wildcard man page compression
	extension. Different distributions (eg. Mageia) compress man pages
	differently.

2024-01-29  Philippe Troin  <phil@fifi.org>

	* tdiff.c (show_version): Update Copyright notice.

	* tdiff.c (xreadlink): Use Linux-specific open with
	O_PATH|O_NOFOLLOW|O_NOATIME followed by readlinkat(fd, "") to
	avoid updating symbolic links st_atime access time.
	(show_version): Show readlink method in --version.

	* configure.ac (HAVE_O_PATH, HAVE_O_FOLLOW, HAVE_READLINKAT): Add.

	* tdiff.c (getAcl, getAclList): Factor reading ACLs out of
	getAclList() info getAcl().
	(diffacl): Separate reading the ACL from converting it to string
	and comparing it so that acl_cmp() can be used (if available) as
	acl_to_text() is expensive.
	(show_version): Show acl_cmp=yes or no in --version.

	* configure.ac (HAVE_ACL_CMP): Test for acl_cmp() (Linux extension).

	* tests/contents.lib.sh:
	* tests/error-unowned-directory.test:
	* tests/error-unowned-file1.test:
	* tests/error-unowned-file2.test:
	* tests/error-unreadable-directory.test:
	* tests/error-unreadable-file.test:
	* tests/fakeroot.lib.sh:
	* tests/mode.lib.sh:
	* tests/option-follow-symlinks.test:
	* tests/parsing-duplicate-exec.test:
	* tests/parsing-missing-placeholders.test:
	* tests/parsing-missing-semicolon.test:
	* tests/parsing-wrong-preset.test:
	* tests/pre-check-file.lib.sh:
	* tests/preset.lib.sh:
	* tests/preset-alltimes.test:
	* tests/preset-amtimes.test:
	* tests/preset-contents.test:
	* tests/preset-hardlinks.test:
	* tests/preset-missing.test:
	* tests/preset-mode.test:
	* tests/preset-mtime.test:
	* tests/preset-none.test:
	* tests/preset-notimes.test:
	* tests/preset-owner.test:
	* tests/require-acl.lib.sh:
	* tests/require-xattr.lib.sh:
	* tests/toggle-acl.test:
	* tests/toggle-atime.test:
	* tests/toggle-blocks.test:
	* tests/toggle-contents-always-diff.test:
	* tests/toggle-contents-always.test:
	* tests/toggle-contents-exec.test:
	* tests/toggle-contents.test:
	* tests/toggle-ctime.test:
	* tests/toggle-directories.test:
	* tests/toggle-exclude.test:
	* tests/toggle-flag-archived.test:
	* tests/toggle-gid.test:
	* tests/toggle-hardlinks.test:
	* tests/toggle-major.test:
	* tests/toggle-minor.test:
	* tests/toggle-mode-and.test:
	* tests/toggle-mode-or.test:
	* tests/toggle-mode.test:
	* tests/toggle-mtime.test:
	* tests/toggle-nlink.test:
	* tests/toggle-size.test:
	* tests/toggle-type-door.test:
	* tests/toggle-type-root.test:
	* tests/toggle-type-sock.test:
	* tests/toggle-type.test:
	* tests/toggle-uid.test:
	* tests/toggle-xattr.test:
	* tests/type.lib.sh:
	Add Copyright notice.

	* tests/test.lib.sh: Add Copyright notice.
	(acl_filter, xid_filter, xtime_filter): Convert to sed regexes to
	extended regexes. FreeBSD does not deal with regex alternation (|)
	in legacy regexes.

	* configure.ac (HAVE_XATTR): Check against lgetxattr, not
	getxattr. Fixes bug introduced in 0ccc359 that skips xattr tests.

	* build-android: Add Copyright notice.
	(build): Build statically. Bump Android SDK to 30.

	* tdiff.c (dropAclXattrs): Also ignore trusted.SGI_ACL_DEFAULT
	xattr. These are only present on XFS directories. SGI_ACL_FILE
	xattr was already ignored.

	* tests/toggle-acl.test (setup): Specify ACL masks
	correctly. Colon should be doubled. Found on FreeBSD 14 which is
	picky about ACL syntax.

2022-05-20  Philippe Troin  <phil@fifi.org>

	* tdiff.c: Update copyright notice.

	* NEWS:
	* README.md:
	* tdiff.spec:
	Add changelog, update to 0.8.6.

	* configure.ac: Updated to 0.8.6.

	* linux_getdents64.c (getdents64): Update prototype.

	* utils.c (pmem): Prefer mallinfo2 if found over mallinfo.

	* configure.ac (HAVE_MALLINFO2): Detect mallinfo2() on newer
	glibcs (2.34).

2019-11-02  Philippe Troin  <phil@fifi.org>

	* tdiff.spec: Fix RHEL Copr builds.

2019-11-01  Philippe Troin  <phil@fifi.org>

	* configure.ac: Update to 0.8.5.

	* tdiff.spec:
	* README.md:
	* NEWS:
	Add changelog, update to 0.8.5.

	* tdiff.c (get_terminal_width): Change terminal width environment
	variable to COLUMNS.
	(get_terminal_width): Ignore zero terminal width as returned by
	TIOCGWINSZ.

2019-08-25  Philippe Troin  <phil@fifi.org>

	* Makefile.am (EXTRA_DIST): Add test-show-results.

	* tdiff.spec (BuildRequires): Add autoconf, automake, libacl-devel.
	(%build): Run autoreconf if config.aux/missing is missing (fixes
	Mageia copr builds).
	(%build): Pass --docdir to configure.
	(%build): Run test-show-results on test-suite failure.
	(%files): Use _docdir again, be consistent SuSE doc location.
	(Release): Bump to 3.

2019-08-24  Philippe Troin  <phil@fifi.org>

	* tdiff.spec (BuildRequires): Add bash, gcc, make.
	(%files): Don't use _docdir, it's broken with copr SuSE builds.

2019-08-24  Philippe Troin  <phil@fifi.org>

	* tdiff.spec (BuildRequires): Add zsh.
	(Source): Use URL.
	(Release): Bump to 2.

2019-06-14  Philippe Troin  <phil@fifi.org>

	* configure.ac:
	Bump release to 0.8.4.

	* README.md:
	* NEWS:
	* tdiff.spec:
	Update changelog, bump release to 0.8.4.

	* tdiff.1.html:
	* tdiff.1.pdf:
	Generate fresh copies with 0.8.4 updates.

2019-06-13  Philippe Troin  <phil@fifi.org>

	* Makefile.am (EXTRA_DIST): Add
	tests/option-follow-symlinks.out.gold.
	(TESTS): Add tests/option-follow-symlinks.test.

	* tests/option-follow-symlinks.test:
	* tests/option-follow-symlinks.out.gold:
	Add.

	* tdiff.c (dodiff): Don't print any reference to "hard" linked
	files when --follow-symlinks is active as symlinked entries will
	be skipped by the hard link cache.

	* _tdiff.zsh: Detect --flags/--acl/--xattr in --help correctly.

	* tdiff.c (show_help): Fix wrong synopsis on -W/--exec-always-diff.

	* tdiff.1: Add -O/--follow-symlinks.

	* tdiff.bash (_tdiff): Add -O/--follow-symlinks.

	* _tdiff.zsh (args): Add -O/--follow-symlinks.

	* tdiff.c (struct option_s): Add follow_symlinks.
	(show_help): Add -O/--follow_symlinks.
	(printopts): Show follow_symlinks.
	(dodiff): Pick either stat or lstat to stat the file depending
	upon follow_symlinks.
	(main): Handle -O/--follow_symlinks.

	* _tdiff.zsh (args): Make -V/--version and -h/--help not repeatable.

2019-05-22  Philippe Troin  <phil@fifi.org>

	* configure.ac:
	Bump release to 0.8.3.

	* README.md:
	* NEWS:
	* tdiff.spec:
	Update changelog, bump release to 0.8.3.

2019-05-21  Philippe Troin  <phil@fifi.org>

	* tests/test.lib.sh (sleep_if_coarse_time): Force sleeping when
	running under Travis.

	* tdiff.c (cmpFiles): Pass pointers to struct stat.
	(get_terminal_width): Set errno to zero *before* strtoul().
	Change width to correct type.

	* genhash.c (gh_stats): Don't divide by zero.

	* tdiff.c (getDirList): Always close the file descriptor.

2019-05-12  Philippe Troin  <phil@fifi.org>

	* configure.ac:
	Bump release to 0.8.2.

	* README.md:
	* NEWS:
	* tdiff.spec:
	Update changelog, bump release to 0.8.2.

	* tdiff.c: HAVE_GETXATTR -> HAVE_LGETXATTR.

	* configure.ac: Check for lgetxattr instead of getxattr: We're
	using lgetxattr anyways, and MacOSX has an incompatible getxattr
	in <sys/xattr.h>.

	* .gitignore: Add the files created by build-android.

	* build-android: Create.

	* tdiff.c: Include in <sys/xattr.h> instead of <attr/xattr.h>.

	* configure.ac (HAVE_XATTR): Look in <sys/xattr.h> instead of
	<attr/xattr.h>.

2019-05-07  Philippe Troin  <phil@fifi.org>

	* tdiff.1.html:
	* tdiff.1.pdf:
	Generate fresh copies.

	* tdiff.1:
	* configure.ac:
	Bump release to 0.8.1.

	* README.md:
	* NEWS:
	* tdiff.spec:
	Update changelog, bump release to 0.8.1.

	* .gitignore: Add make_door, have_subsecond_times.

	* tdiff.1: Elaborate on opening files with O_NOATIME.

	* tests/toggle-flag-archived.test (flag): Strip the toggle-
	file-name prefix.

	* tests/parsing-duplicate-exec.test (duplicate_exec_filter):
	Filter out the SVr4 diff "No differences encountered".

	* tests/test.lib.sh (sleep_if_coarse_time): Call
	have_subsecond_times to find out if the build directory actually
	has subsecond times.

	* Makefile.am (noinst_PROGRAMS): Add have_subsecond_times.
	(have_subsecond_times_SOURCES): Create.

	* have_subsecond_times.c: Create.

	* Makefile.am (libtdiff_a_SOURCES): Add st_xtime_ns.h.

	* st_xtime_ns.h: Create.

	* tdiff.c: Move the ST_XTIMENSEC macros to their own st_xtime_ns.h
	header.

	* tdiff.spec (BuildRequires): Add fakeroot.

	* tests/error-unowned-file2-*: Create.

	* Makefile.am (EXTRA_DIST, TESTS): Add tests/error-unowned-file2-*.

	* tests/error-unowned-file-*: Rename to tests/error-unowned-file1-*.

	* Makefile.am (EXTRA_DIST, TESTS): Rename tests/error-unowned-file-*
	to tests/errors-unowned-file1-*.

	* tests/error-unwritable-*: Rename to tests/error-unowned-*.

	* Makefile.am (EXTRA_DIST, TESTS): Rename tests/error-unwritable-*
	to tests/errors-unowned-*.

	* tests/error-unwritable-directory.test:
	* tests/error-unwritable-directory.out.gold:
	* tests/error-unwritable-file.test:
	* tests/error-unwritable-file.out.gold:
	Create.

	* Makefile.am (EXTRA_DIST, TESTS): Add tests/error-unwritable.

	* tests/test.lib.sh (run_test): Print the tdiff command line.
	(run_test): Allow overriding the tdiff arguments by defining
	TDIFF_ARG1 and TDIFF_ARG2.

	* tdiff.c (getDirList, cmpFiles): When an open/opendir fails with
	EPERM and O_NOATIME was in the flags, retry without it.  O_NOATIME
	is only allowed for root and file owner.

	* tests/error-*: Rename to tests/error-unreadable-*.

	* Makefile.am (EXTRA_DIST, TESTS): Rename tests/error-* to
	tests/error-unreadable-*.

2019-05-03  Philippe Troin  <phil@fifi.org>

	* tests/parsing-duplicate-exec.test (duplicate_exec_filter):
	FreeBSD's sed is really dated, no alternation in regexes.

	* Makefile.am (TESTS): Add tests/parsing-*.test.
	(EXTRA_DIST): Add tests/parsing-*.out.gold.

	* tests/parsing-duplicate-exec.out.gold:
	* tests/parsing-duplicate-exec.test:
	* tests/parsing-missing-placeholders.out.gold:
	* tests/parsing-missing-placeholders.test:
	* tests/parsing-missing-semicolon.out.gold:
	* tests/parsing-missing-semicolon.test:
	* tests/parsing-wrong-preset.out.gold:
	* tests/parsing-wrong-preset.test:
	Create.

	* tests/toggle-*.out.gold: Update.

	* tests/*.{test,out.gold}: Rename toggle tests and results to
	tests/toggle-*.{test,out.gold}.

	* Makefile.am (TESTS): Rename toggle tests tests/*.test to
	tests/toggle-*.test.
	(EXTRA_DIST): Rename toggle tests results tests/*.out.gold to
	tests/toggle-*.out.gold.

	* tdiff.c (reportMissing, getAclList, reportMissingFile, dodiff)
	(main): Don't use abort(), print a nice error message and exit 4.

	* configure.ac (HAVE_NANOSECOND_TIME_RESOLUTION): Fix feature
	shell variable name for having st_atimespec stat(2) fields.
	This will cause a regression failure on MacOSX which has
	st_atimespec but the nanoseconds fields are empty.

	* tdiff.1.html:
	* tdiff.1.pdf:
	Generate fresh copies.

	* tdiff.1:
	* configure.ac:
	Bump release to 0.8.

	* README.md:
	* NEWS:
	* tdiff.spec:
	Update changelog, bump release to 0.8.

	* tdiff.c (get_exec_args): Exit directly if the ending semicolon
	is missing, there are no more arguments to consume and getopt
	returns non-sensical values.  Remove return value.
	(main): Do not check get_exec_args() return value;

	* tdiff.spec (files): Use %{_docdir}/%{name}, not just %{_docdir}.

	* tests/preset.lib.sh (preset_size_filter): Filter out node1's
	size on Solaris.

	* tdiff.1: Update: --size and --blocks checks work on all file
	types but directories.

	* tests/preset.lib.sh (setup): Use sync_if_needed.
	When running as root on Solaris, always sleep as device nodes for
	some reason only have second st_xtime resolution.

	* tests/blocks.test (setup): Use sync_if_needed.

	* tests/test.lib.sh (sync_if_needed): Create.  Only call sync when
	on Solaris.

	* Makefile.am (AM_TESTS_ENVIRONMENT): Export TARGET_OS.

	* configure.ac: AC_SUBST(TARGET_OS).

	* tests/error-file.out.gold: Update.

	* tests/error-file.test (setup): Set permissions on all files.

	* tests/preset-flags-alltimes.out.gold: Update to reorder
	time-related option lists that were changed a bit back but not
	updated for the -flags- gold output.

	* tdiff.c (CHECK_FLAG): Fix missing semicolon.

	* tdiff.1:
	* README.md:
	Enhance, fix typos.

2019-05-02  Philippe Troin  <phil@fifi.org>

	* tests/error-directory.out.gold: Update.

	* tests/error-directory.test (setup): Create another case where
	both directories are unreadable.

	* tdiff.c (dodiff): Print a message about directories being
	skipped when unreadable.

	* tests/error-file.out.gold:
	* tests/error-file.test:
	Create.

	* Makefile.am (TESTS): Add tests/error-file.test.
	(EXTRA_DIST): Add tests/error-file.out.gold.

	* tdiff.c (cmpFiles): Use exit codes to communicate back to caller
	if no differences were found, there was a difference or there was
	an error.
	(dodiff): When calling cmpFile, interpret result.  Print "contents
	comparison skipped" upon error instead of just "contents differ".

	* Makefile.am (EXTRA_DIST, TESTS): tests/error.*->
	tests/error-directory.*.

	* tests/error.*: Rename to tests/error-directory.*.

	* tests/hardlinks.out.gold (tdiff):
	* tests/directories.out.gold (tdiff):
	Update, exit code should be 2.

	* tdiff.c (reportMissingXattr, reportMissingAcl)
	(reportMissingFile, reportMissingHardLink): Return if the value
	was found different or not (a discrepancy may not need to be
	reported if a toggle option turn it off).

	* str_list.h: Update str_list_compare prototype.

	* str_list.c (str_list_compare): When missing entries are
	detected, delegate signaling an error to the reportMissing
	callback, which must now return an int.

	* Makefile.am (clean-local): Create, erasing the test directories.

	* str_list.c (str_list_compare): Use BUMP_EXIT_CODE
	to manipulate exit code.

	* tdiff.c (compareXattrs, compareAcls, dodiff): Use BUMP_EXIT_CODE
	to manipulate exit code.

	* tdiff.h (BUMP_EXIT_CODE): Define.

	* tests/mtime.out.gold: Update, error code should be 2.

	* tdiff.c (dodiff): Get rid of localerr, just operate on rv.
	Report a diff error when mtimes differ.

	* str_list.c (str_list_compare): Get rid of the useless localerr.

	* tdiff.c (cmpFiles): Don't say open & close twice on open/close
	error messages.

	* m4/fi_format_man.m4 (FI_FORMAT_MAN): Add rules to optionally
	install/uninstall HTML and PDF documentation.

	* tdiff.1:
	* tests/preset-*alltimes.out.gold:
	* tests/atime.test (atime_filter):
	* tdiff.c (struct option_s, show_help, printopts, dodiff, main):
	* tdiff.bash (_tdiff):
	* _tdiff.zsh (args):
	Rename -r/-R (--atime) to -y/-Y to free up the -r option.
	Reorder time-related option lists.

	* tdiff.c (main): Long options for --acl/--noacl were added to long options
	structure on wrong feature macro.

	* tdiff.1:
	* _tdiff.zsh (args):
	* tdiff.bash (_tdiff):
	* tdiff.c (struct option_s, show_help, printopts, main):
	Reorder options consistently.

	* tests/mode-and.test (tdiff_options):
	* tests/mode-or.test (tdiff_options):
	* tdiff.bash (_tdiff):
	* tdiff.c (show_help, main):
	* _tdiff.zsh (args):
	Rename -| to -o and -& to -a.

	* tdiff.c (get_octal_arg): Show base on number parsing error.

	* tdiff.1: Update the --version description.

	* tdiff.c (show_version): Show time granularity (seconds or
	nanoseconds).

	* tests/preset.lib.sh (setup):
	* tests/mtime.test (setup):
	* tests/ctime.test (setup):
	Use sleep_if_coarse_time instead of sleep.

	* tests/test.lib.sh (sleep_if_coarse_time): Create, only sleep if
	we don't have nanosecond time resolution.

	* Makefile.am (AM_TESTS_ENVIRONMENT): Pass
	HAVE_NANOSECOND_TIME_RESOLUTION down to environment.

	* configure.ac: AC_SUBST(HAVE_NANOSECOND_TIME_RESOLUTION) for
	regressions.

	* tdiff.spec (files): Ship %{_docdir} instead of individual %doc
	files.

	* Makefile.am (EXTRA_DIST): Move README.md to dist_doc_DATA.
	(dist_doc_DATA): Define with README, README.md, NEWS.

	* _tdiff.zsh:
	* tdiff.bash (_tdiff):
	Add presets.  Remove -a/--all/-A/--no-all.

2019-05-01  Philippe Troin  <phil@fifi.org>

	* README.md:
	* tdiff.1:
	Add presets.  Remove -a/--all/-A/--no-all.

	* tests/preset-missing.test (tdiff_options):
	* tests/preset-notimes.test (tdiff_options):
	* tests/preset-alltimes.test (tdiff_options):
	Use alternate preset names.

	* tdiff.c (show_help): Show preset 6 as the default.
	(main): Add aliases to preset names: default aliased to notimes,
	type aliased to missing.

	* tdiff.1: Shuffle the manpage around 3 option subsections
	(standard, toggles, miscellaneous).

	* tdiff.1: Add language to say that -w/-W/-x turn on -c.

	* tests/contents-diff.test (tdiff_options): Drop -c.
	(tdiff_long_options): Drop --contents.
	--exec turns on -c/--contents, no need to specify it.

	* tests/preset-flags-*.out.gold:
	* tests/preset-flags-*.test:
	Create.

	* Makefile.am (TESTS): Add tests/preset-flags-*.test.
	(EXTRA_DIST): Add tests/preset-flags-*.out.gold.

	* tests/preset.lib.sh (setup): When flags are available, modify a
	file's flags.

	* tests/preset-xattr-*.out.gold:
	* tests/preset-xattr-*.test:
	Create.

	* Makefile.am (TESTS): Add tests/preset-xattr-*.test.
	(EXTRA_DIST): Add tests/preset-xattr-*.out.gold,
	tests/require-xattr.lib.sh.

	* tests/preset.lib.sh (setup): When xattr are available, modify a
	file xattr.

	* tests/require-xattr.lib.sh: Create.

	* tests/acl.test: Factorize the code for verifying xattrs are
	supported in require-xattr.lib.sh.

	* tests/preset-acl-*.out.gold:
	* tests/preset-acl-*.test:
	Create.

	* Makefile.am (TESTS): Add tests/preset-acl-*.test.
	(EXTRA_DIST): Add tests/preset-acl-*.out.gold,
	tests/require-acl.lib.sh.

	* tests/preset-notimes.test (contents_filter):
	* tests/preset-mtime.test (mtime_filter):
	* tests/preset-hardlinks.test (hardlinks_filter):
	* tests/preset-contents.test (contents_filter):
	* tests/preset-amtimes.test (amtimes_filter):
	* tests/preset-alltimes.test (alltimes_filter):
	Add preset_acl_filter to filter chain.

	* tests/preset-owner.test (owner_filter): Create with
	preset_xid_filter and preset_acl_filter.

	* tests/preset.lib.sh (setup): When acl are available, modify a
	file acl.
	(preset_acl_filter): Create, whether to filter or not depends on
	having acl support.

	* tests/acl.test (acl_filter): Move to test.lib.sh.
	(preset_acl_filter): Create, whether to filter or not depends on
	having root.

	* tests/require-acl.lib.sh: Create.

	* tests/acl.test: Factorize the code for verifying ACLs are
	supported in require-acl.lib.sh.

	* tests/preset-root-*.out.gold:
	* tests/preset-root-*.test:
	Create.

	* tests/preset-owner.test (filter): Use preset_xid_filter.

	* tests/preset-notimes.test (contents_filter):
	* tests/preset-mtime.test (mtime_filter):
	* tests/preset-contents.test (contents_filter):
	* tests/preset-amtimes.test (amtimes_filter):
	* tests/preset-alltimes.test (alltimes_filter):
	Add preset_xid_filter to filter chain.

	* tests/preset-hardlinks.test (hardlinks_filter): Define.
	(filter): Use hardlinks_filter.

	* tests/preset.lib.sh (setup): When running with root, change uid
	and gid for a few files, add device files.
	(preset_xid_filter): Create, whether to filter or not depends on
	having root.

	* Makefile.am (TESTS): Add tests/preset-root-*.test.
	(EXTRA_DIST): Add tests/preset-root-*.out.gold.

	* tdiff.1: Change --major/--minor description noting that the
	comparison only works on device files of the same type.

	* tests/gid.test (gid_filter):
	* tests/uid.test (uid_filter):
	Use xid_filter.

	* tests/test.lib.sh (xid_filter): Create.

	* tests/filters.lib.sh (xtime_filter):
	Move from filters.lib.sh to test.lib.sh.
	Remove tests/filters.lib.sh.

	* Makefile.am (EXTRA_DIST): Remove tests/filters.lib.sh.

	* tests/filters.lib.sh (nlink_filter):
	* tests/nlink.test (nlink_filter):
	Move from filters.lib.sh back to nlink.test.

	* tests/preset-alltimes.out.gold:
	* tests/preset-amtimes.out.gold:
	* tests/preset-contents.out.gold:
	* tests/preset-mtime.out.gold:
	* tests/preset-notimes.out.gold:
	Remove (top-level) nlink for preset_hardlinks_filter.

	* tests/preset-alltimes.test (alltimes_filter):
	* tests/preset-amtimes.test (amtimes_filter):
	* tests/preset-contents.test (contents_filter):
	* tests/preset-mtime.test (mtime_filter):
	* tests/preset-notimes.test (contents_filter):
	preset_filter -> preset_hardlinks_filter.
	Add preset_hardlinks_filter.

	* tests/preset-hardlinks.test (filter): Use
	preset_hardlinks_filter instead of nlink_filter.

	* tests/preset.lib.sh (preset_filter): Rename to preset_size_filter.
	(preset_hardlinks_filter): Create, needed for HFS which does weird
	things with hard link counts.

	* tests/preset-alltimes.out.gold:
	* tests/preset-amtimes.out.gold:
	Drop entry3 atime entry.

	* tests/preset.lib.sh (toplevel_atime_filter): Rename to
	preset_atime_filter and filter out entry3's atime: on systems
	without nanosecond resolution entry3 (which is linked to entry2)
	will have been read a first time when compared as entry2, and the
	atime will update and won't be reported as different for entry3,
	causing a failure.
	(preset_reset): Create: The atimes need to be reset in the past
	for systems that don't have both NO_ATIME and nanosecond time
	resolution: in their case the multiple tdiff passes will reset the
	atimes at the same time during the comparison stage.
	(reset): Define to preset_reset.
	(setup): Add sleeps in between the directory 1 and 2 creations,
	and after we're done, which will delay the reset by a second.
	Otherwise preset_reset will set the [ma]times in the past, but the
	ctimes will be the same as the directory2 files.

	* tests/preset-alltimes.test (alltimes_filter):
	* tests/preset-amtimes.test (amtimes_filter):
	toplevel_atime_filter -> preset_atime_filter.

	* tdiff.c: HAVE_ST_XTIMESPEC -> HAVE_ST_ATIMESPEC.  Fixes breakage
	on systems have have st_xtimespec.

	* configure.ac (HAVE_RANDOM): Provide header comment string.
	(HAVE_ST_XTIMESPEC): This was replaced by HAVE_ST_ATIMESPEC when
	we used the_CHECK_IDENTIFIER() macro.
	(HAVE_ST_TIMENSEC): Typo in header comment string.

	* m4/fi_check_identifier.m4: Correct header.

	* m4/fi_check_egrep.m4 (FI_CHECK_EGREP): Fix whitespace error.

	* tests/atime.test (setup): Move the resetting of the directories'
	atimes to atime_reset.
	(atime_reset): Create.
	(reset): Define to atime_reset.

	* tests/test.lib.sh (run_test): Run a reset function, if defined,
	before each run.

	* tests/preset-alltimes.out.gold:
	* tests/preset-amtimes.out.gold:
	* tests/preset-contents.out.gold:
	* tests/preset-hardlinks.out.gold:
	* tests/preset-mode.out.gold:
	* tests/preset-mtime.out.gold:
	* tests/preset-notimes.out.gold:
	* tests/preset-owner.out.gold:
	Update for FreeBSD, Solaris and the changes to filtering.

	* tests/preset-alltimes.test:
	* tests/preset-amtimes.test:
	* tests/preset-contents.test:
	* tests/preset-mtime.test:
	* tests/preset-notimes.test:
	Filter by entry1_filter and optionally toplevel_atime_filter.

	* tests/preset.lib.sh (entry1_filter): Create: Filter out the
	directory vs. file blocks and size comparison.  The exact block
	count and size may be the same (and not part of the diff) or be
	different on different file systems.
	(toplevel_atime_filter): Create: Filter out the atime on the
	top-level directory.  They will be the same on Linux with the
	various default nodiratime mount options by default, but will be
	different on traditional Unix.
	(setup): Switch permissions around on entry1, now 700 for dir and
	600 for file.  Sync after writes for Solaris Bug.

	* tests/preset.lib.sh:
	* tests/preset-*.test:
	Create.

	* Makefile.am (TESTS): Add tests/preset-*.test.
	(EXTRA_DIST): Add tests/preset.lib.sh, tests/preset-*.out.gold.

2019-04-30  Philippe Troin  <phil@fifi.org>

	* Makefile.am (EXTRA_DIST): Add tests/filters.lib.sh.

	* tests/filters.lib.sh: Created.

	* tests/[cam]time.test ([cam]time_filter): Move & generalize to
	tests/filters.lib.sh's xtime_filter.

	* tests/nlink.test (nlink_filter): Move to tests/filters.lib.sh.

	* tests/mode-and.test:
	* tests/mode-or.test:
	(tdiff_options2, tdiff_long_options2): Use alternate option forms.

	* tests/test.lib.sh: Allow up to 3 short option runs and 2 long
	option runs.

	* tests/*.test:  Use presets instead of --all/--no-all.

	* tdiff.c (show_help): Remove -a/--all, -A/--no-all. Add
	-[p0-9]/--preset.
	(applyPresets): Create.
	(main): Remove -a/--all, -A/--no-all. Add -[p0-9]/--preset.

	* Makefile.am (CLEANFILES): Add tests/*.tmp.* tests/*.out
	tests/*~

	* m4/fi_project.m4 (FI_PROJECT): Add .*~ to FI_CLEANFILES.

	* tests/*.test: Add tdiff_long_options.

	* tests/test.lib.sh (run_test): Factorize code.
	Run tests twice, once with short options, the second time with
	long options if HAVE_GETOPT_LONG.

	* Makefile.am (AM_TESTS_ENVIRONMENT): Pass HAVE_GETOPT_LONG.

	* configure.ac: AC_SUBST(HAVE_GETOPT_LONG).

	* Makefile.am (TESTS, EXTRA_DIST): Rename group tests to gid.
	Rename owner tests to uid.

	* tests/group.*: Rename to tests/gid.*.

	* tests/owner.*: Rename to tests/uid.*.

	* README.md:
	* _tdiff.zsh:
	* tdiff.1:
	* tdiff.bash:
	* tdiff.c:
	* tests/:
	* tests/group.out.gold:
	* tests/group.test:
	* tests/owner.out.gold:
	* tests/owner.test:
	Change -o/--owner into -u/--uid.
	Change --group into --gid.

	* tdiff.1: Document --hardlinks option.

	* README.md: Document hard link sets feature.

	* tdiff.1: Document the -f/--flags options.

	* tdiff.1: Bump version to 0.8.
	Typographic fixes.
	Explain long options naming.
	Show which checks are active by default.

	* README.md: Typographic fixes.

	* tests/hardlinks.out.gold:
	* tests/hardlinks.test:
	Create.

	* Makefile.am (TESTS): Add hardlinks.test.
	(EXTRA_DIST): Add hardlinks.out.gold.

	* README.md:
	* tdiff.1:
	Add examples.

	* m4/fi_format_man.m4 (FI_FORMAT_MAN): Mark the generated file as
	.PRECIOUS. Use a m4 macro for the target name.

	* tests/test.lib.sh: Allow the tdiff command to be overridden with
	the TDIFF environment variable to run eg. valgrind.

	* tdiff.spec (Version):
	* configure.ac (AC_INIT):
	* README.md (Changelog):
	* NEWS:
	Update for release 0.7.2.

	* tests/error.out.gold: Update for the error rephrasing.

	* tests/error.test (readdir_filter): Create, substitute getdents
	with readdir in output, and remove the exact error code as it may
	differ from system to system.

	* tests/error.test: Skip when running as root.

	* tests/error.out.gold: Update for forced directory mode.

	* tests/error.test (setup): Force the sub-directories mode as they
	get in the error output and can vary depending on the running
	user's umask.

2019-04-29  Philippe Troin  <phil@fifi.org>

	* tests/nlinks.out.gold, tests/nlinks.test: Rename to
	test/nlink.*, rename nlinks to nlink.

	* tdiff.c (struct option_s, show_help, printopts, dodiff, main):
	Rename nlinks to nlink.

	* tdiff.bash (_tdiff): Rename nlinks to nlink.

	* tdiff.1: Rename nlinks to nlink.

	* _tdiff.zsh (args): Rename nlinks to nlink.

	* Makefile.am (TESTS, EXTRA_DIST): Rename nlinks to nlink.

	* tdiff.c (struct option_s): Add hardlinks1, hardlinks2, empty_str_list.
	(reportMissingHardLink): Create.
	(dodiff): Handle hard links: report any differences in hard link
	sets and construct the hard link sets.
	(main): Create, report on and destroy the hard links caches.
	(main): Free options.empty_str_list if created by reportMissingHardLink.

	* str_list.c (str_list_compare): Allow compareEntries to be NULL
	and skip the compare.

	* hard_links_cache.h: Create.

	* hard_links_cache.c: Create.

	* Makefile.am (libtdiff_a_SOURCES): Add hard_links_cache.[ch].

	* tdiff.c (reportMissingXattr, reportMissingAcl): Factorize common
	code to reportMissing().
	(reportMissing): Create.

	* str_list.c (str_list_new_size): Handle zero-sized lists.
	(str_list_push, str_list_push_length): Factorize code to grow list
	in str_list_grow().
	(str_list_grow): Create, allow zero-sized lists.

	* str_list.h (str_list_new_size): Add.
	(str_list_new): Inline and implement with str_list_new_size.

	* str_list.c (str_list_new_size): Add.

	* Makefile.am (libtdiff_a_SOURCES): Add str_list.[ch].

	* str_list.[ch]: Create.

	* tdiff.c: Move strList functions to str_list.[ch] and rename to
	str_list_.

	* Makefile.am (TESTS): Add error.test.
	(EXTRA_DIST): Add error.out.gold.

	* tests/error.test: Create.

	* tests/error.out.gold: Create.

	* tdiff.c (diffacl): Delay initializing clientData until it's
	actually needed.
	(getDirList): When an error occurs, always return NULL.
	(dodiff): Only diff xattrs if both sides haven't returned an error
	getting xattrs, and otherwise mark the error status as XIT_SYS.
	(dodiff): Only free xattr lists if they have been created.
	(dodiff): Only diff directory contents if both sides haven't
	returned an error getting xattrs, and otherwise mark the error
	status as XIT_SYS.
	(dodiff): Only free directory lists if they have been created.

	* tests/test.lib.sh: Run cleanup_test, if it exists, before wiping
	the directories at test start.

	* tdiff.c (print_list): Fix off-by-one that causes overflow.

	* tests/mode.lib.sh (cleanup_test): Create, chmod'ing directories
	back to at least u+rwx to ensure deletion.

2019-04-28  Philippe Troin  <phil@fifi.org>

	* ent_pair_cache.h (struct ent_key_s): Move to ent_key.h.
	Include config.h.

	* ent_key.h: Create.

	* Makefile.am (libtdiff_a_SOURCES): Add ent_key.h.

	* ent_pair_cache.c: Do not include genhash.h, already included in
	ent_pair_cache.h.

	* utils.h: Do not include tdiff.h.

	* utils.c: Include tdiff.h.

	* configure.ac: Add AC_C_INLINE.

	* ent_pair_cache.c (epc_new, epc_destroy, epc_get, epc_put): Inline.
	(epc_hash): Use gh_binary_hash.
	(ic_equal): Rename to epc_equal.

	* ent_pair_cache.h (epc_new, epc_destroy, epc_get, epc_put): Inline.

	* genhash.c (gh_binary_hash): Add.

	* genhash.h: Add gh_binary_hash.

	* .gitignore:
	* Makefile.am:
	* inocache*:
	* tdiff.c:
	* tests/inocache.test:
	Rename inocache* to ent_pair_cache*.

	* inocache.[ch]:
	* inocache_test.c:
	* tdiff.c:
	(struct ic_ent_s): Rename to struct ent_pair_cache_key_s, use ent_key_t.
	(inocache_t): Rename to ent_pair_cache_t.
	(ic_delete): Rename to epc_destroy.
	(ic_*): Rename to epc_*e.

	* inocache.h (struct ent_key_s): Create.

2019-04-27  Philippe Troin  <phil@fifi.org>

	* tdiff.c (struct option_s, printopts, main): Re-add hardlinks.
	(show_help, main): Re-add -e, --hardlinks, -E, --no-hardlinks
	options.

	* tdiff.zsh (_tdiff): Re-add -e, --hardlinks, -E, --no-hardlinks
	options.

	* tdiff.bash (_tdiff): Re-add --hardlinks, --no-hardlinks options.

	* tdiff.spec (Version):
	* configure.ac (AC_INIT):
	* README.md (Changelog):
	* NEWS:
	Update for release 0.7.1.

	* inocache.c (ic_equal): Fix miscomparison in inode cache device
	numbers.

	* tdiff.c (show_help): Typos fixed.

2019-04-26  Philippe Troin  <phil@fifi.org>

	* tdiff.1.html:
	* tdiff.1.pdf:
	Add.

	* NEWS:
	* tdiff.1:
	Update for release 0.7.

	* m4/fi_git_revision.m4 (FI_GIT_REVISION): Make the git check
	quiet.

	* tdiff.c: Include sys/tty.h if needed.

	* configure.ac: Add a check for winsize in sys/tty for Solaris.

	* Makefile.am (EXTRA_DIST): Add tdiff.spec.

	* tdiff.spec: Create.

	* Makefile.am (EXTRA_DIST): Add README.md.

	* README.md: Create.

	* README: Update to be a documentation index.

	* configure.ac (getdents): Don't AC_DEFINE(STRUCT_DIRENT) until we
	found out which one to use.  Otherwise, configure tests will have
	multiple versions defined.

	* tdiff.1: Add a blurb about compiled-in features in --version
	description.

	* tdiff.c (get_terminal_width, print_list): Create.
	(show_version): Use print_list to print features, show O_NOATIME
	support, list recognized BSD flags.

	* configure.ac: Call AC_HEADER_TIOCGWINSZ.

	* Makefile.am (noinst_HEADERS): Define for linux_getdents*.c which
	should be shipped.

	* tdiff.1: Correct style.

	* tdiff.bash: Add copyright header, emacs local variables block.

	* _tdiff.zsh: Add copyright header.  Emacs local variables block
	must be at end of file.

	* tests/flag-*.out.gold: Update for tdiff -vv.

	* Makefile.am:
	* tests/*.test:
	* tests/*.lib:
	Rename tests/*.lib to tests/*.lib.sh.

	* tdiff.c (get_exec_args): Terminate the argument list with NULL.

	* tdiff.1: Add section about hard links.

	* tests/contents-always2.out.gold: Update.

	* tests/contents-always2.test (tdiff_options): Use echo instead of
	plain diff.

	* tdiff.c (dodiff): Don't run always exec if we're comparing the
	same file (same device and inode).

2019-04-25  Philippe Troin  <phil@fifi.org>

	* tests/*.out.gold: Update for tdiff -vv.

	* tests/test.lib: Use tdiff -vv.

	* tests/exclude.out.gold: Update for new messages issues by
	hard-linking.

	* tests/contents.lib (setup): Create some hard-links.

	* tdiff.1: Enhance.

	* tdiff.c (show_help): Document the -vvvv option.

	* tests/mode.out.gold: Update.

	* tdiff.c (OPT_MODE_OR_DEFAULT, OPT_MODE_AND_DEFAULT): Define.
	(dodiff): Only show masked values when either --mode-or or
	--mode-and are used.
	(main): Use OPT_MODE_OR_DEFAULT and OPT_MODE_AND_DEFAULT when
	initializing options structure.

	* m4/fi_format_man.m4 (FI_FORMAT_MAN):
	AC_REQUIRE(FI_FORMAT_MAN_INIT_ONCE), use groff instead of man to
	format manpage hard copies.
	(FI_FORMAT_MAN_INIT_ONCE): Call AM_MISSING_PROG(groff).

	* configure.ac (FI_FORMAT_MAN): Call on tdiff.1 for html & pdf.

	* Makefile.am (dist_man1_MANS): Add tdiff.1.
	(EXTRA_DIST): Ship tdiff.1.html & tdiff.1.pdf.

	* m4/fi_format_man.m4 (FI_FORMAT_MAN): Imported from wolpd.

	* tdiff.1: Create.

2019-04-24  Philippe Troin  <phil@fifi.org>

	* tdiff.c (show_help): Fix typography (space after comma).
	(execprocess): Only assign arguments if they're set.

	* tests/nlinks.test (nlinks_filter):
	* tests/mtime.test (mtime_filter):
	* tests/ctime.out.gold:
	Update for "(top-level)".

	* tdiff.c (reportMissingXattr, reportMissingAcl, dodiff): Use
	"(top-level)" instead of "." for reporting discrepancies at the
	top-level item.

	* tests/owner.test (owner_filter):
	* tests/group.test (owner_filter):
	Users/groups may not have name and may show up empty.

	* tests/nlinks.test (nlinks_filter):
	* tests/mtime.test (mtime_filter):
	* tests/nlinks.out.gold:
	* tests/mtime.out.gold:
	Drop the top-level directory: The link count or mtime may not
	changed for directories on non-traditional file systems (eg. HFS).

	* tests/ctime.test (setup): Replace file1 with a directory on
	directory 2 or the ctime change is not guaranteed on
	non-sub-second time systems (eg. MacOSX).

	* tests/owner.test (owner_filter):
	* tests/mtime.test (mtime_filter):
	* tests/group.test (owner_filter):
	* tests/ctime.test (ctime_filter):
	* tests/contents-always-diff.test (always_diff_filter):
	* tests/blocks.test (blocks_filter):
	* tests/atime.test (atime_filter):
	* tests/acl.test (acl_filter):
	Can't use sed -r on MacOSX.

	* tests/contents-always-diff.test (always_diff_filter): Drop "No
	differences encounted" lines emitted by Solaris diff.

	* tests/type-door.test, tests/type-door.out.gold: Create.

	* make_door.c: Create.

	* Makefile.am (make_door): Create new noninst_PROGRAMS make_door,
	only compiled if HAVE_S_IFDOOR.
	(TESTS): Add tests/type-door.test
	(EXTRA_DIST): Add tests/type-door.out.gold
	(AM_TESTS_ENVIRONMENT): Add HAVE_S_IFDOOR.

	* configure.ac (HAVE_S_IFDOOR): Create an automake conditional and
	substitution variable.

	* Makefile.am (make_sock_LDADD): Define to $(LIB_FOR_SOCKETS) for
	Solaris.

	* configure.ac: Call FI_USE_XNET, FI_CHECK_LIB_FOR_SOCKETS.

	* m4/fi_use_xnet.m4, m4/fi_check_lib_for_sockets.m4: Imported from
	fif's aclocal svn repository.

	* _tdiff.zsh (args): Update -W option documentation.

	* tdiff.c (show_help, main): -W options uses "diff -u" instead of
	"diff -uN" as -N is not univerally implemented and is useless as
	we never call diff with less than two existing files.

	* make_sock.c (main): Can't use sun as an identifier, it's a
	defined constant on Solaris.  Rename sun to saddrun.

	* tests/blocks.test (setup): Increase block counts to 16 4k
	blocks.  Add a sync before returning as Solaris won't update block
	counts until the files are committed to disk.

	* tests/contents-always-diff.out.gold: Update.

	* tests/contents-always-diff.test (always_diff_filter): Filter the
	@@ diff output lines which may be different on different OSes.

	* m4/fi_project.m4: Remove .deps on distclean, not on clean.

	* tests/xattr.test (pre_check_file): Create:  verify that setfattr
	works on the build directory before comitting to the tests.

	* tests/group.test (setup): Chgrp all files to GID 0 in case
	directories have BSD semantics.

	* tests/atime.test (setup): BSD do not update atime on
	directories.  Force update the atime for the files we expect
	change on with touch.

	* configure.ac (HAVE_ST_FLAGS): AC_SUBST().

	* Makefile.am (AM_TESTS_ENVIRONMENT): Add HAVE_ST_FLAGS.
	(TESTS): Add tests/flag-*.test.
	(EXTRA_DIST): Add tests/pre-check-file.lib, tests/flag-*.out.gold.

	* tests/flag-*.test, tests/flag-*.out.gold: Create.

	* tests/test.lib: Run $cleanup_test on both compare directories,
	if set.

	* tests/test.lib (mktemp): mktemp only works if the XXXX template
	is at the end of the file name on FreeBSD.

	* tests/acl.test: Skip test if we cannot alter ACLs on a test
	file with pre-check-file.

	* tests/pre-check-file.lib: Create.

	* tests/test.lib: Don't use >& file construct, it's not
	traditional Bourne.

	* make_sock.c (main): bind() takes a struct sockaddr* on BSDs.

2019-04-22  Philippe Troin  <phil@fifi.org>

	* .gitignore: Ignore gcov files.

	* m4/fi_project.m4 (FI_PROJECT): Ignore gcov files.

	* .gitattributes: Mark test suite gold files as generated.

	* .gitignore: Ignore new make_sock, and test temporary output.

	* Makefile.am (make_sock): Create new noninst_PROGRAMS make_sock,
	only compiled if HAVE_S_IFSOCK.
	(AM_TESTS_ENVIRONMENT): Create: pass needed environment variables
	to tests.
	(TESTS): Add new tests (tests/*.test).
	(TEST_EXTENSIONS): Define to .test.
	(EXTRA_DIST): Append test gold output files (tests/*.gold), ($(TESTS)) and test
	libraries (tests/*.lib).

	* configure.ac (FAKEROOT): Add a check for fakeroot.
	(HAVE_S_IFSOCK): Create an automake conditional and substitution
	variable.
	(HAVE_XATTRS, HAVE_ACLS): Create AC_SUBST for test driver.

	* make_sock.c: Create.

	* tdiff.c (dodiff): Fix error when comparing times, a discrepancy
	happens when either the seconds or nanoseconds differ (used to be
	both had to differ).

	* tdiff.c (dodiff): Only report that symlink contents when
	--contents is specified.

	* tdiff.c (dodiff): Remove useless block.

	* tests/inocache.test, tests/genhash.test: Create.

	* Makefile.am (TESTS): Use instead of defining our own check
	target.
	(TEST_EXTENSIONS): Define.
	(EXTRA_DIST): Add TESTS.

2019-04-18  Philippe Troin  <phil@fifi.org>

	* m4/fi_compiler_warnings.m4 (FI_COMPILER_WARNINGS): Add
	--enable/disable-compiler-warnings.  Default to enabled only if
	maintainer-mode is enabled and the GNU C is detected (requires
	AM_MAINTAINER_MODE and AC_PROG_CC to be called before this macro).

2019-04-15  Philippe Troin  <phil@fifi.org>

	* tdiff.c (cmpFiles): Remove unused parameter opts.
	(compareXattrs): Use e2.
	(ATTRIBUTE_UNUSED): Create.
	(compareFileEntries): Mark e2 as unused parameter.
	(compareAcls): Mark p2 as unused parameter.
	(freeStrList): Make i a size_t.
	(compareStrList): Make i1, i2 size_t.
	(formatTime): Make written a size_t.

	* inocache.c (ic_hash): Make i a size_t.

	* genhash.c (gh_remove): Remove unimplemented gh_remove().

	* genhash.h (gh_remove): Remove unimplemented gh_remove().

	* Makefile.am (AM_CFLAGS): Remove.

	* configure.ac : Call FI_COMPILER_WARNINGS.

	* m4/fi_compiler_warnings.m4 (FI_COMPILER_WARNINGS): Create.

	* m4/fi_project.m4 (FI_PROJECT): Remove .deps directory on clean.

2019-03-14  Philippe Troin  <phil@fifi.org>

	* m4/fi_check_shell_functions_dir.m4
	(FI_CHECK_SHELL_FUNCTIONS_DIR): Add missing AC_TR_SH where needed.

	* .gitignore: Ignore /config.fi.frag.make.

	* tdiff.zsh: Renamed to _tdiff.zsh so that it can be installed
	with zsh_FUNCTIONS.

	* m4/fi_check_shell_functions_dir.m4
	(FI_CHECK_SHELL_FUNCTIONS_DIR): Enhance the macro to generate
	Makefile fragment automatically installing & uninstalling all
	functions listed in the <shell>_FUNCTIONS Makefile variables.

	* Makefile.am (install-data-local, uninstall-local): Factorize
	shell function install/uninstall code to the
	FI_CHECK_SHELL_FUNCTIONS_DIR m4 macro.

	* m4/fi_project.m4 (FI_PROJECT): Use FI_AUTOMAKE_FRAGMENT to
	define FI_CLEANFILES Makefile variable, and clean-fi-project,
	distclean-fi-project, maintainer-clean-fi-project targets for
	cleaning up.

	* Makefile.am (distclean-local, maintainer-clean-local)
	(CLEANFILES): Move to FI_PROJECT m4 macro.

	* m4/fi_automake_fragment.m4 (FI_AUTOMAKE_FRAGMENT): Created.

	* m4/fi_project.m4 (FI_PROJECT): Pass $1 to AM_INIT_AUTOMAKE, not
	the nonexistent $3.

	* tdiff.c (dropAclXattrs): Also ignore trusted.SGI_ACL_FILE when
	using Acls.

2019-03-12  Philippe Troin  <phil@fifi.org>

	* ChangeLog : Spell-checked.

	* tdiff.zsh (args): -v and --verbose may be repeated.

	* tdiff.c (getDirList): Rename GETDENTS_STRUCT to STRUCT_DIRENT.
	Remove old compat code that was used for Solaris 5.6 which had a
	different getdents.

	* configure.ac (GETDENTS_RETURN_Q, GETDENTS_NEXTDENT): Removed
	defines.
	(GETDENTS_STRUCT): Rename to STRUCT_DIRENT.

2019-03-11  Philippe Troin  <phil@fifi.org>

	* inocache_test.c, inocache.c, genhash_test.c, genhash.c: Include
	config.h first.

	* tdiff.c : Include "config.h" first and don't define _GNU_SOURCE,
	autoconf takes care of defining it if needed.

	* tdiff.c (get_numeric_arg): Renamed to get_octal_arg. Defaulted
	to parsing numbers as octal.

	* tdiff.c (struct option_s, printopts, main): Remove hardlinks.
	(show_help, main): Remove -e, --hardlinks, -E, --no-hardlinks
	options.

	* tdiff.zsh (_tdiff): Remove -e, --hardlinks, -E, --no-hardlinks
	options.

	* tdiff.bash (_tdiff): Remove --hardlinks, --no-hardlinks options.

	* configure.ac (--with-bash-functions-dir): Add new --with option.

	* Makefile.am (BASH_FUNCTIONS_DIR): Define substituted variable.
	(install-data-local, uninstall-local): (Un)Install bash completion
	if requested.
	(EXTRA_DIST): Add tdiff.bash.

	* tdiff.bash : Created.

	* configure.ac : Use FI_CHECK_SHELL_FUNCTIONS_DIR([zsh]).

	* m4/fi_check_shell_functions_dir.m4
	(FI_CHECK_SHELL_FUNCTIONS_DIR): Created new macro after
	factorizing the zsh shell function code in configure.ac.

	* Makefile.am (ZSH_FUNCTIONS_DIR): Define substituted variable.
	(install-data-local, uninstall-local): (Un)Install zsh completion
	function if requested.
	(EXTRA_DIST): Define it to tdiff.zsh.

	* configure.ac (--with-zsh-functions-dir): Added new --with
	option.
	(have_zsh): Test for zsh existence for determining default for
	--with-zsh-functions-dir option.
	(ZSH_FUNCTIONS_DIR): AC_SUBST when --with-zsh-functions-dir is
	active.
	(INSTALL_ZSH_FUNCTIONS): New conditional to install zsh functions.

	* tdiff.zsh: Created.

2019-03-10  Philippe Troin  <phil@fifi.org>

	* Makefile.am (distclean-local): Remove autom4te.cache on
	distclean.

	* configure.ac, tdiff.c : If a libc getdents is found, prefer it
	over the syscall versions.

	* configure.ac (HAVE_GETDENTS64_SYSCALL_H): Added feature test.
	Always check libc getdents.

	* tdiff.c : Support getdents64.

	* configure.ac (HAVE_GETDENTS): Use FI_CHECK_EGREP whenever
	possible.  Use cache and include linux_getdents.c to check working
	getdents.

	* linux_getdents.c (getdents): Created from snippet in tdiff.c.
	(struct dent): Renamed to linux_dent.

	* tdiff.c (getdents): Move getdents code to linux_getdents.c.

	* tdiff.c (show_version): Print a feature line (acl, flags,
	readdir & xattr built-in features) on --version.

	* configure.ac (HAVE_MMAP, HAVE_MADVISE): Removed feature tests.

	* tdiff.c (cmpFiles, dodiff): Pass the struct stat of both files
	to avoid extra seeks.
	(cmpFiles): Remove mmap()-base compare algorithm.
	(struct option_s, show_help, printopts, main): Remove nommap.

2019-03-09  Philippe Troin  <phil@fifi.org>

	* tdiff.c (getDirList): Have the opendir() implementation use open with
	O_NOATIME followed by fdopendir if fdopendir is available instead
	of calling opendir (which does not set O_NOATIME).

	* configure.ac (HAVE_O_DIRECTORY, HAVE_FDOPENDIR): New feature
	checks.

	* tdiff.c (printopts): Dump verbosityLevel and nommap.
	(VERB_MEM_STATS): Defined.
	(main): Show memory stats on verbose above VERB_MEM_STATS.
	(main): Use line buffering for stdout and stderr to avoid
	intermingling their outputs.

	* utils.c (pmem): Coerce all numbers to long for portability.

	* utils.c, utils.h (pmem): Always define, remove #ifdef DEBUG.

2019-03-08  Philippe Troin  <phil@fifi.org>

	* tdiff.c : Rename opt to opts everywhere for consistency.
	(VERB_STATS): Defined.
	(struct option_s): Added stats member.
	(reportMissingFile): Count single files.
	(reportMissingFile, compareFileEntries): Count excluded files.
	(show_help): Added -vvv option.
	(dodiff): Count compared, contents-compared and two kinds of
	skipped files.
	(main): Initialize options with memset + assignments instead of
	initializer.
	(main): Prints stats on -v.
	(dodiff): Print skip messages on stderr.

	* tdiff.c (VERB_SKIPS, VERB_HASH_STATS): Defined.
	(struct option_s): Rename verbose to verbosityLevel.
	(show_help): Add doc on multiple verbosity levels.
	(dodiff, main): Use verbosityLevel instead of verbose.
	(main): Show inode cache stats if verbosity level is
	VERB_HASH_STATS or more.

	* tdiff.c (dodiff): Since DJB2 hash will go through all bytes in
	the structure including gaps, memset it.

	* inocache.c (ic_hash): Use DJB2 hash algorithm.

	* genhash.c (gh_string_hash): Rename to gh_string_hash_old.
	(gh_string_hash): Use DJB2 hash algorithm.

	* tdiff.c (getAclList): acl_get_file() can return EINVAL on
	MacOSX.

	* tdiff.c (xperror): Created.
	(getXattrList, compareXattrs, getAclList, getDirList, cmpFiles)
	(xreadlink, dodiff): Use xperror.

	* configure.ac (HAVE_GETOPT_LONG, HAVE_MALLINFO, madvise-check)
	(HAVE_LSTAT): Use FI_LINK_IFELSE.

	* m4/fi_link_ifelse.m4 (FI_LINK_IFELSE):  Created.

	* tdiff.c (show_help, main): Add -W option as a shortcut to -w
	diff %1 %2 \;.
	Allow -w/-W/-x options to be specified more than once (and warn
	about it).

	* configure.ac (HAVE_MADVISE): Don't assume that madvise() is
	broken when cross-compiling, but warn about the assumption.

	* tdiff.c (getDirList): Remove superfluous test in readdir()
	version. (FreeBSD 12).
	(dodiff): Spell-out flag differences by name instead of just
	giving the hex flags.

	* configure.ac (HAVE_MAJOR_MINOR_FUNCTIONS): Also check if
	major() and minor() are functions (FreeBSD 12).
	(HAVE_UF_*): Update with new flags.

2019-03-07  Philippe Troin  <phil@fifi.org>

	* m4/fi_check_identifiers.m4 (FI_CHECK_IDENTIFIERS): Created.

	* m4/fi_check_identifier.m4 (FI_CHECK_IDENTIFIER): Created.

	* m4/fi_check_egrep.m4 (FI_CHECK_EGREP): Created.

	* configure.ac : Factorize initialization code to FI_PROJECT().

	* m4/fi_project.m4 (FI_PROJECT): Created.

	* configure.ac (AM_MAINTAINER_MODE): Added.
	(AM_PROG_AR): Added, caught by -Wall.
	(getdents, random, najor & minor, st_timensec): Implement caching.
	(GIT_REVISION) Factorized to m4/fi_get_revision.m4.
	(O_NOATIME, S_XXX, UF_XXX, SF_XXX): Use factorized
	m4/fi_get_defines.
	(st_atimespec, st_flags, getxattr): Use factorized
	FI_CHECK_IDENTIFIER.

	* NEWS: Added 0.2.99.WIP release for distcheck.

	* configure.ac (AM_INIT_AUTOMAKE): Add -Wall, check-news.

	* Makefile.am (ACLOCAL_AMFLAGS): Set m4 include path.

	* m4/fi_git_revision.m4 (FI_GIT_REVISION): Created.

	* m4/fi_check_defines.m4 (FI_CHECK_DEFINES): Created.

	* m4/fi_check_define.m4 (FI_CHECK_DEFINE): Created.

	* tdiff.c (getDirList, cmpFiles): Open files with O_NOATIME if
	available.

	* configure.ac (O_NOATIME): Add a check for O_NOATIME.

	* Makefile.am (clean-local): Remove backup files.

	* tdiff.c (show_version): Show git revision in --version.

	* configure.ac: AC_DEFINE the git revision.

	* Makefile.am (maintainer-clean-local): Clean config.aux.

	* configure.ac: Add AC_CONFIG_AUX_DIR(config.aux)

	* tdiff.c (reportMissingFile): Fix bug where tdiff / otherdir
	would report missing files in / with the missing last character.

2014-01-31  Philippe Troin  <phil+github-commits@fifi.org>

	* tdiff.c (dodiff): Do block and size diffs for all types of files
	EXCEPT directories.

2014-01-30  Philippe Troin  <phil+github-commits@fifi.org>

	* tdiff.c (main): Move -n/N option (minor) to -k/K.
	(main): Create --nlinks/-n --hardlinks/-e options.
	(dodiff): Don't do type-specific checks unless both objects are
	the same type.
	(dodiff): Do block and size diffs for all types of files.
	(dodiff): Check nlinks.

2014-01-29  Philippe Troin  <phil+github-commits@fifi.org>

	* configure.ac, Makefile.am, tdiff.c: Add support for nanosecond
	timestamps on Linux.  Fix CFLAGS mess.  Fix reporting data
	corruption when reporting on the root folders of the comparison.

2014-01-28  Philippe Troin  <phil+github-commits@fifi.org>

	* tdiff.c (compareXattrs): Compare Xattrs, re-org missing elements
	printing.
	Acl support.

	* Makefile.am (AM_CFLAGS): Add -Wall.

	* tdiff.c (newStrList, pushStrList): Created and abstracted.
	(compareStrList): Created and abstracted string list comparison.

2014-01-27  Philippe Troin  <phil+github-commits@fifi.org>

	* Convert to automake.

	* tdiff.c (cmpFiles): Use madvise(MADV_WILLNEED)

2006-09-19  Philippe Troin  <phil+github-commits@fifi.org>

	* tdiff.c: Call getdents correctly on modern linux.  Use long long
	to print file sizes for LFS compatibility.

	* configure.in: Fix getdents detection on modern linux.  Upgrade
	to autoconf 2.59.  Use LFS.

	* inocache.c (ic_hash): Fix 64-bit hashing.

LocalWords:  Troin tdiff zsh args getDirList arg Un dropAclXattrs SGI md
LocalWords:  DIRENT compat Solaris getdents NEXTDENT inocache genhash dir
LocalWords:  config autoconf struct printopts hardlinks Makefile FI m4 fd
LocalWords:  SUBST distclean autom4te libc syscall EGREP ChangeLog acls
LocalWords:  getdents64 linux acl readdir xattr mmap stdout gitignore cmp
LocalWords:  cmpFiles dodiff nommap opendir NOATIME fdopendir MEM stderr
LocalWords:  verbosityLevel utils pmem ifdef reportMissingFile vvv memset
LocalWords:  compareFileEntries initializer inode DJB2 ic gh UF README ns
LocalWords:  getAclList EINVAL MacOSX xperror getXattrList compareXattrs
LocalWords:  xreadlink GETOPT MALLINFO madvise LSTAT IFELSE FreeBSD PROG
LocalWords:  najor timensec fi atimespec getxattr distcheck INIT NOFOLLOW
LocalWords:  ACLOCAL AMFLAGS otherdir phil nlinks timestamps CFLAGS MADV
LocalWords:  Xattrs newStrList pushStrList compareStrList automake LFS
LocalWords:  WILLNEED CLEANFILES changelog readlinkat atime readlink ACLs
LocalWords:  getAcl diffacl xid xtime sed regexes lgetxattr SDK XFS
LocalWords:  mallinfo2 mallinfo
