diff options
| author | Richard M. Stallman | 1996-04-10 04:15:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-04-10 04:15:13 +0000 |
| commit | 8eb2807f9b59b14eb646d536f3250eaaccf7ba18 (patch) | |
| tree | df6603f7aa2dea0d5df78e19b3d8caaa06ec08f1 /src/unexec.c | |
| parent | 1bd7b2c7154a2bc72f6b2c32ef6a2bf4dc295b32 (diff) | |
| download | emacs-8eb2807f9b59b14eb646d536f3250eaaccf7ba18.tar.gz emacs-8eb2807f9b59b14eb646d536f3250eaaccf7ba18.zip | |
[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; | |||
| 176 | #include <coff-encap/a.out.encap.h> /* The location might be a poor assumption */ | 176 | #include <coff-encap/a.out.encap.h> /* The location might be a poor assumption */ |
| 177 | #else | 177 | #else |
| 178 | #ifdef MSDOS | 178 | #ifdef MSDOS |
| 179 | #if __DJGPP__ > 1 | ||
| 180 | #include <fcntl.h> /* for O_RDONLY, O_RDWR */ | ||
| 181 | #endif | ||
| 179 | #include <coff.h> | 182 | #include <coff.h> |
| 180 | #define filehdr external_filehdr | 183 | #define filehdr external_filehdr |
| 181 | #define scnhdr external_scnhdr | 184 | #define scnhdr external_scnhdr |
| @@ -876,6 +879,14 @@ copy_text_and_data (new, a_out) | |||
| 876 | 879 | ||
| 877 | #else /* COFF, but not USG_SHARED_LIBRARIES */ | 880 | #else /* COFF, but not USG_SHARED_LIBRARIES */ |
| 878 | 881 | ||
| 882 | #ifdef MSDOS | ||
| 883 | #if __DJGPP__ >= 2 | ||
| 884 | /* Dump the original table of exception handlers, not the one | ||
| 885 | where our exception hooks are registered. */ | ||
| 886 | __djgpp_exception_toggle (); | ||
| 887 | #endif | ||
| 888 | #endif | ||
| 889 | |||
| 879 | lseek (new, (long) text_scnptr, 0); | 890 | lseek (new, (long) text_scnptr, 0); |
| 880 | ptr = (char *) f_ohdr.text_start; | 891 | ptr = (char *) f_ohdr.text_start; |
| 881 | #ifdef HEADER_INCL_IN_TEXT | 892 | #ifdef HEADER_INCL_IN_TEXT |
| @@ -890,6 +901,13 @@ copy_text_and_data (new, a_out) | |||
| 890 | end = ptr + f_ohdr.dsize; | 901 | end = ptr + f_ohdr.dsize; |
| 891 | write_segment (new, ptr, end); | 902 | write_segment (new, ptr, end); |
| 892 | 903 | ||
| 904 | #ifdef MSDOS | ||
| 905 | #if __DJGPP__ >= 2 | ||
| 906 | /* Restore our exception hooks. */ | ||
| 907 | __djgpp_exception_toggle (); | ||
| 908 | #endif | ||
| 909 | #endif | ||
| 910 | |||
| 893 | #endif /* USG_SHARED_LIBRARIES */ | 911 | #endif /* USG_SHARED_LIBRARIES */ |
| 894 | 912 | ||
| 895 | #else /* if not COFF */ | 913 | #else /* if not COFF */ |