Fix subspace record bug on HP-UX 10.20.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Feb 2014 17:23:08 +0000 (09:23 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Feb 2014 17:23:08 +0000 (09:23 -0800)
commitd51c175a53de5edfa3f56daf0496755af6f913ee
tree47a285a4ec23b206a2c07e3c7dea98b12dd6e682
parentccd5d23b0adea0aa0d8b8f1bcc4ca2630f9214a3
Fix subspace record bug on HP-UX 10.20.

* unexhp9k800.c (unexec_error): New function, to simplify the code.
(check_lseek): New function, to report lseek errors.
(save_data_space, update_file_ptrs, read_header, write_header)
(copy_file, copy_rest, unexec): Use these news functions.
(update_file_ptrs): Don't assume wraparound behavior when
converting a large size_t value to off_t.

Fixes: debbugs:16717
src/ChangeLog
src/unexhp9k800.c