mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-27 18:04:32 +00:00
(EOVERFLOW): Define if not defined.(stack_t): Define to struct sigaltstack if not defined or declared. Include <sys/resource.h>, <ucontext.h> if available. Include <stdio.h> if DEBUG. Do not include <inttypes.h> or <stdint.h>. (c_stack_die): Remove info and context args. All uses changed. (segv_action): Likewise. (alternate_signal_stack): Change uintmax_t to long, to ease porting. (get_stack_location, min_address_from_argv, max_address_from_argv, null_action): New functions. (stack_base, stack_size): New vars. (segv_handler): context arg may not be used. Use global stack_base, stack_size if ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC. Add debug code. Invoke die (rather than segv_action) to exit. (c_stack_action): Accept new argv arg, and simpler handler arg. All uses changed. Move code into new functions above. Allow null action. [! (defined SA_ONSTACK && defined _SC_PAGESIZE)]: Assume all segvs are stack overflows. (main) [DEBUG]: Describe what output should be like.