# HG changeset patch # User Richard M. Stallman # Date 769635295 0 # Node ID ad2116571bc42087007f896d73aa3ef6d2d572f8 # Parent 41a42a288277ba5bc23d8c5bf9be372746e5eb4f Include config.h. [HPUX_USE_SHLIBS]: Include dl.h. (brk_on_dump): New variable. (unexec): Set brk_on_dump. (copy_file): Change buffer size to 8192. diff -r 41a42a288277 -r ad2116571bc4 src/unexhp9k800.c --- a/src/unexhp9k800.c Sun May 22 19:05:23 1994 +0000 +++ b/src/unexhp9k800.c Sun May 22 19:34:55 1994 +0000 @@ -43,6 +43,26 @@ #include +#ifdef emacs +#include +#endif + +#ifdef HPUX_USE_SHLIBS +#include +#endif + +/* brk value to restore, stored as a global. + This is really used only if we used shared libraries. */ +static long brk_on_dump = 0; + +/* Called from main, if we use shared libraries. */ +int +run_time_remap (ignored) + char *ignored; +{ + brk (brk_on_dump); +} + #define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1)) /* n is power of 2 */ #define min(x,y) (((x) < (y)) ? (x) : (y)) @@ -78,6 +98,8 @@ /* Read the old headers */ read_header (old, &hdr, &auxhdr); + + brk_on_dump = sbrk (0); /* Decide how large the new and old data areas are */ old_size = auxhdr.exec_dsize; @@ -246,7 +268,7 @@ int size; { int len; - int buffer[8196]; /* word aligned will be faster */ + int buffer[8192]; /* word aligned will be faster */ for (; size > 0; size -= len) {