# HG changeset patch # User Karl Heuer # Date 837805646 0 # Node ID c24b00e705ba623701cfbb3463d1dc4a45ffd45d # Parent d149a26c9109c514360754dc7298ce61ae56b365 (copy_text_and_data) [DJGPP >= 2]: Switch off two bits in `_crt0_startup_flags' so they don't go into the dumped Emacs. Restore the value of `_crt0_startup_flags' after .text and .data were dumped. diff -r d149a26c9109 -r c24b00e705ba src/unexec.c --- a/src/unexec.c Fri Jul 19 19:41:03 1996 +0000 +++ b/src/unexec.c Fri Jul 19 19:47:26 1996 +0000 @@ -178,6 +178,8 @@ #ifdef MSDOS #if __DJGPP__ > 1 #include /* for O_RDONLY, O_RDWR */ +#include /* for _crt0_startup_flags and its bits */ +static int save_djgpp_startup_flags; #endif #include #define filehdr external_filehdr @@ -884,6 +886,11 @@ /* Dump the original table of exception handlers, not the one where our exception hooks are registered. */ __djgpp_exception_toggle (); + + /* Switch off startup flags that might have been set at runtime + and which might change the way that dumped Emacs works. */ + save_djgpp_startup_flags = _crt0_startup_flags; + _crt0_startup_flags &= ~(_CRT0_FLAG_NO_LFN | _CRT0_FLAG_NEARPTR); #endif #endif @@ -905,6 +912,9 @@ #if __DJGPP__ >= 2 /* Restore our exception hooks. */ __djgpp_exception_toggle (); + + /* Restore the startup flags. */ + _crt0_startup_flags = save_djgpp_startup_flags; #endif #endif