(Detailed Context, Detailed Unified, Alternate Names, diff Options): Do not document diff -L.
(Comparing Directories): Do not document diff -P.
(Making Patches, diff Options): Likewise.
(diff Performance, sdiff Option Summary, diff Options, sdiff Options): Do not document diff -H.
(diff Performance, diff Options): Do not document --horizon-lines.
(cmp Options): Prefer -b to -c.
(cmp Options, diff Options, diff3 Options, sdiff Options): Put short
options next to the similar long options.
Document --help, and use the same wording for --verbose on all commands.
(diff3 Options): Fix typo in description of -E, which used wrongly used
"-e" instead of "-E".
(patch Options): Put short options next to the similar long options.
(ENOTSUP): Define if errno.h doesn't.
(SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_SIGINFO, SIGSTKSZ, _SC_PAGESIZE,
ALTERNATE_STACK_SIZE, stack_t, sigaltstack): Remove; we now assume them
all when HAVE_XSI_STACK_OVERFLOW_HEURISTIC, so we don't need substitutes.
(<ucontext.h>): Include only if HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
(alternate_signal_stack): Now of size SIGSTKSZ, not ALTERNATE_STACK_SIZE.
(segv_handler): Simplify, under the assumption that
HAVE_XSI_STACK_OVERFLOW_HEURISTIC is nonzero.
(c_stack_action): Likewise.
(exit_failure) [DEBUG]: Initialize to 0, not 1.
(recurse, main) [DEBUG]: Remove main args.
to 2.7.9.
(AM_INIT_AUTOMAKE): Use new form, with options gnits dist-shar,
rather than old from that duplicated AC_INIT.
(AM_MISSING_PROG): Add help2man.
(REGEX_MALLOC): Define.
(AC_CONFIG_FILES): Add man/Makefile.
(AC__GNU_SOURCE): Add this, replacing AH_VERBATIM of _GNU_SOURCE.
(AM_GNU_GETTEXT): Add external arg, from gettext 0.11.
(tempname): Use AC_LIBOBJS, not LIBOBJS=, as now required by autoconf.
(jm_PREREQ_C_STACK): Add.
(AC_CONFIG_FILES): Remove intl/Makefile.
unsigned -> unsigned int
(EXIT_SUCCESS, EXIT_FAILURE, EXIT_TROUBLE): Define if not defined.
Include signal.h.
(SA_RESTART): Define if not defined.
(SIGCHLD): Likewise.
0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
(ck_editor_status): New function.
(main): Check for stack overflow.
Adopt POSIX convention for subsidiary programs not found.
(diffarg): Check for integer overflow to avoid core dumps.
(trapsigs): Remove SA_INTERRUPT special case; now done by header.
(SIGCHLD): Likewise.
(edit): Adopt POSIX convention for subsidiary programs not found.
preposterously incompatible.
(slurp): Do not dump core if the file is growing as we read it.
If a regular file grows, keep reading until we catch up with its EOF.
(find_and_hash_each_line): Check for integer overflow to avoid core dumps.
(GUESS_LINES): Remove.
(guess_lines): New function. Avoid integer overflow.
(find_identical_ends): Use it.
Avoid integer overflow and possible core dumps.
(ALLOCATE): Remove. All uses changed to xmalloc, or to xmalloc plus
an overflow check.
(myread): Remove.
(main): Check for stack overflow.
0 -> EXIT_SUCCESS, 1 -> EXIT_FAIULRE, 2 -> EXIT_TROUBLE.
(try_help): Likewise.
(process_diff): Check for integer overflow, to avoid core dumps.
2 -> EXIT_TROUBLE.
(read_diff): Exit with status 126 if the file is not executable,
for compatibility with POSIX 1003.1-2001.
Accommodate ancient AIX hosts that set errno to EINTR after uncaught
SIGCONT.
Check for integer overflow to avoid core dumps.
(fatal, perror_with_exit): 2 -> EXIT_TROUBLE.
Do not include signal.h.
(specify_style, specify_value): Bring these routines back, as POSIX
requires that the order of options not matter.
(shortopts): New constant.
(group_format_option, line_format_option): New constants.
(LONG_OPTION, GROUP_FORMAT_OPTION, LINE_FORMAT_OPTION): New macros.
(longopts): Use them.
(main): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
Ensure that order of options does not matter.
Check for stack overflow.
If contexts overflow, substitute LIN_MAX, as that's good enough.
If multiple contexts are specified, use their maximum.
-c is equivalent to -C 3 now, instead of having an implicit context;
likewise for -u and -U 3.
Use specify_style and specify_value.
(SIGCHLD): Do not define; now done in a header.
Use new style time stamp format for -u / -U.
Reject numeric-string options if operating in POSIX 1003.1-2001 mode.
Avoid overflow problems with tab width.
Simplify from-file and to-file code.
(usage): Do not mention obsolete options.
(filetype): Do not mention whether a file is executable.
Add typed memory objects.
(compare_files): 0 -> EXIT_SUCCESS, 1 -> EXIT_FAILURE, 2 -> EXIT_TROUBLE.
(errno): Declare if !STDC_HEADERS.
Include signal.h.
(SA_RESTART): Define if not already defined.
Include <inttypes.h>.
(PTRDIFF_MAX): Define if not already defined.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
(block_read): Accommodate ancient AIX hosts that set errno to EINTR
after uncaught SIGCONT.
(buffer_lcm): Return a reasonable size if the multiple is too large.
New arg LCM_MAX. All callers changed.