From 81f5583d8a094f038036b5902db4a383edc5d1ea Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 25 Mar 2025 10:34:40 +0800 Subject: [PATCH] Fix the DJGPP build * msdos/emacs.djl (.bss): Guarantee that lread.o is 8-byte aligned. * msdos/sed2v2.inp (ALIGNOF_INT, ALIGNOF_LONG) (ALIGNOF_LONG_LONG): Correct typos. * src/term.c (tty_free_frame_resources): Synchronize with non-DOS variant. (cherry picked from commit 49eab999f13fede351ab7700c1469ba6cbf3d6b8) --- msdos/emacs.djl | 7 ++++++- msdos/sed2v2.inp | 6 +++--- src/term.c | 4 ++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/msdos/emacs.djl b/msdos/emacs.djl index 3f6e0852b32..65b2401667e 100644 --- a/msdos/emacs.djl +++ b/msdos/emacs.djl @@ -52,7 +52,12 @@ SECTIONS } .bss SIZEOF(.data) + ADDR(.data) : { - *(.bss .gnu.linkonce.b.*) + /* Binutils always assumes an alignment of 2 for this section, with + the result that lread.o (which defines lispsym) must be aligned + to a multiple of 8 by hand. */ + lread.o(.bss) + EXCLUDE_FILE(lread.o) *(.bss) + *(.gnu.linkonce.b.*) *(COMMON) end = . ; PROVIDE(_end = .) ; . = ALIGN(0x200); diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 6a6a3c2d9a8..cb44aea4634 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -140,9 +140,9 @@ s/^#undef HAVE_DECL_STRTOIMAX *$/#define HAVE_DECL_STRTOIMAX 1/ s/^#undef HAVE_PDUMPER *$/#define HAVE_PDUMPER 1/ s/^#undef HAVE_STRTOLL *$/#define HAVE_STRTOLL 1/ s/^#undef HAVE_STRTOULL *$/#define HAVE_STRTOULL 1/ -s/^#undef ALIGNOF_INT *$/s/^.*$/#define ALIGNOF_INT 4/ -s/^#undef ALIGNOF_LONG *$/s/^.*$/#define ALIGNOF_LONG 4/ -s/^#undef ALIGNOF_LONG_LONG *$/s/^.*$/#define ALIGNOF_LONG_LONG 4/ +/^#undef ALIGNOF_INT *$/s/^.*$/#define ALIGNOF_INT 4/ +/^#undef ALIGNOF_LONG *$/s/^.*$/#define ALIGNOF_LONG 4/ +/^#undef ALIGNOF_LONG_LONG *$/s/^.*$/#define ALIGNOF_LONG_LONG 4/ /^#undef HAVE_STRUCT_DIRENT_D_TYPE *$/c\ #if __DJGPP__ + (__DJGPP_MINOR__ >= 5) >= 3\ #define HAVE_STRUCT_DIRENT_D_TYPE 1/\ diff --git a/src/term.c b/src/term.c index 32f3c8c48d6..864f86aa730 100644 --- a/src/term.c +++ b/src/term.c @@ -4183,6 +4183,10 @@ tty_free_frame_resources (struct frame *f) { eassert (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)); free_frame_faces (f); + /* Deleting a child frame means we have to thoroughly redisplay its + root frame to make sure the child disappears from the display. */ + if (FRAME_PARENT_FRAME (f)) + SET_FRAME_GARBAGED (root_frame (f)); } #endif -- 2.39.5