diff options
| author | Richard M. Stallman | 1994-05-22 19:34:55 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-22 19:34:55 +0000 |
| commit | b8a0abf2def982c318bb2dc97382bdfa0146238f (patch) | |
| tree | bd39e53f4df714d651646a99432efaef38ebbf3e | |
| parent | 2d49d361ae7a8efb41f4e75fcd70412b2883dd63 (diff) | |
| download | emacs-b8a0abf2def982c318bb2dc97382bdfa0146238f.tar.gz emacs-b8a0abf2def982c318bb2dc97382bdfa0146238f.zip | |
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.
| -rw-r--r-- | src/unexhp9k800.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c index 0d8f1a7cf0e..76bfa1f8551 100644 --- a/src/unexhp9k800.c +++ b/src/unexhp9k800.c | |||
| @@ -43,6 +43,26 @@ | |||
| 43 | 43 | ||
| 44 | #include <a.out.h> | 44 | #include <a.out.h> |
| 45 | 45 | ||
| 46 | #ifdef emacs | ||
| 47 | #include <config.h> | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #ifdef HPUX_USE_SHLIBS | ||
| 51 | #include <dl.h> | ||
| 52 | #endif | ||
| 53 | |||
| 54 | /* brk value to restore, stored as a global. | ||
| 55 | This is really used only if we used shared libraries. */ | ||
| 56 | static long brk_on_dump = 0; | ||
| 57 | |||
| 58 | /* Called from main, if we use shared libraries. */ | ||
| 59 | int | ||
| 60 | run_time_remap (ignored) | ||
| 61 | char *ignored; | ||
| 62 | { | ||
| 63 | brk (brk_on_dump); | ||
| 64 | } | ||
| 65 | |||
| 46 | #define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1)) /* n is power of 2 */ | 66 | #define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1)) /* n is power of 2 */ |
| 47 | #define min(x,y) (((x) < (y)) ? (x) : (y)) | 67 | #define min(x,y) (((x) < (y)) ? (x) : (y)) |
| 48 | 68 | ||
| @@ -78,6 +98,8 @@ unexec (new_name, old_name, new_end_of_text, dummy1, dummy2) | |||
| 78 | 98 | ||
| 79 | /* Read the old headers */ | 99 | /* Read the old headers */ |
| 80 | read_header (old, &hdr, &auxhdr); | 100 | read_header (old, &hdr, &auxhdr); |
| 101 | |||
| 102 | brk_on_dump = sbrk (0); | ||
| 81 | 103 | ||
| 82 | /* Decide how large the new and old data areas are */ | 104 | /* Decide how large the new and old data areas are */ |
| 83 | old_size = auxhdr.exec_dsize; | 105 | old_size = auxhdr.exec_dsize; |
| @@ -246,7 +268,7 @@ copy_file (old, new, size) | |||
| 246 | int size; | 268 | int size; |
| 247 | { | 269 | { |
| 248 | int len; | 270 | int len; |
| 249 | int buffer[8196]; /* word aligned will be faster */ | 271 | int buffer[8192]; /* word aligned will be faster */ |
| 250 | 272 | ||
| 251 | for (; size > 0; size -= len) | 273 | for (; size > 0; size -= len) |
| 252 | { | 274 | { |