diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-04-10 04:15:13 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-04-10 04:15:13 +0000 |
commit | 0e7052e4f73bfd292cde9c8028e95f280e3bb0c3 (patch) | |
tree | 30183b111eea4459ae076ddb08e3a6f23bf4a1b5 /src/unexec.c | |
parent | d20f2552b2f250231a0c4246058a7236bbca914d (diff) | |
download | emacs-0e7052e4f73bfd292cde9c8028e95f280e3bb0c3.tar.gz |
[DJGPP v2]: Include fcntl.h.
(copy_text_and_data) [DJGPP v2]: Call __djgpp_exception_toggle.
Diffstat (limited to 'src/unexec.c')
-rw-r--r-- | src/unexec.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/unexec.c b/src/unexec.c index 65d36ba8688..7e276015943 100644 --- a/src/unexec.c +++ b/src/unexec.c @@ -176,6 +176,9 @@ int need_coff_header = 1; #include <coff-encap/a.out.encap.h> /* The location might be a poor assumption */ #else #ifdef MSDOS +#if __DJGPP__ > 1 +#include <fcntl.h> /* for O_RDONLY, O_RDWR */ +#endif #include <coff.h> #define filehdr external_filehdr #define scnhdr external_scnhdr @@ -876,6 +879,14 @@ copy_text_and_data (new, a_out) #else /* COFF, but not USG_SHARED_LIBRARIES */ +#ifdef MSDOS +#if __DJGPP__ >= 2 + /* Dump the original table of exception handlers, not the one + where our exception hooks are registered. */ + __djgpp_exception_toggle (); +#endif +#endif + lseek (new, (long) text_scnptr, 0); ptr = (char *) f_ohdr.text_start; #ifdef HEADER_INCL_IN_TEXT @@ -890,6 +901,13 @@ copy_text_and_data (new, a_out) end = ptr + f_ohdr.dsize; write_segment (new, ptr, end); +#ifdef MSDOS +#if __DJGPP__ >= 2 + /* Restore our exception hooks. */ + __djgpp_exception_toggle (); +#endif +#endif + #endif /* USG_SHARED_LIBRARIES */ #else /* if not COFF */ |