summaryrefslogtreecommitdiff
path: root/src/unexhp9k800.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-01-13 21:48:03 +0000
committerJim Blandy <jimb@redhat.com>1992-01-13 21:48:03 +0000
commitd427b66a664c0e1ffc818dfa5b87b45b4857d2ae (patch)
treea3255be5cf521ab9c44b9fdfd06a0466274be421 /src/unexhp9k800.c
parentb2c9579f172da05112f29b664de6d8da98c1e813 (diff)
downloademacs-d427b66a664c0e1ffc818dfa5b87b45b4857d2ae.tar.gz
entered into RCS
Diffstat (limited to 'src/unexhp9k800.c')
-rw-r--r--src/unexhp9k800.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c
index 259b9318514..8d34a3a3d7a 100644
--- a/src/unexhp9k800.c
+++ b/src/unexhp9k800.c
@@ -60,6 +60,7 @@ unexec(new_name, old_name, new_end_of_text, dummy1, dummy2)
int old_size, new_size;
struct header hdr;
struct som_exec_auxhdr auxhdr;
+ long i;
/* For the greatest flexibility, should create a temporary file in
the same directory as the new file. When everything is complete,
@@ -81,7 +82,10 @@ unexec(new_name, old_name, new_end_of_text, dummy1, dummy2)
/* Decide how large the new and old data areas are */
old_size = auxhdr.exec_dsize;
- new_size = sbrk(0) - auxhdr.exec_dmem;
+ /* I suspect these two statements are separate
+ to avoid a compiler bug in hpux version 8. */
+ i = sbrk (0);
+ new_size = i - auxhdr.exec_dmem;
/* Copy the old file to the new, up to the data space */
lseek(old, 0, 0);