summaryrefslogtreecommitdiff
path: root/src/msdos.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-04-15 18:05:52 +0300
committerEli Zaretskii <eliz@gnu.org>2019-04-15 18:05:52 +0300
commit70ec3928666353b69efae1bdc831d704fa505e72 (patch)
treeb84519a00dbfbe4943fd19d0f6d5aff58d0ddd19 /src/msdos.c
parent7a608fc6f3ded3e615e7accb29f16bfd290d80a1 (diff)
downloademacs-70ec3928666353b69efae1bdc831d704fa505e72.tar.gz
Fix the MSDOS build when running under CWSDPMI
* src/msdos.c (the_only_tty_output): Define. * src/msdos.h (the_only_tty_output): Declare. * src/frame.c (make_terminal_frame) [MSDOS]: * src/dispnew.c (init_display) [MSDOS]: Set up f->output_data.tty pointer using the_only_tty_output, before dereferencing the pointer. This prevents crashes with DPMI servers that provide NULL pointer protection.
Diffstat (limited to 'src/msdos.c')
-rw-r--r--src/msdos.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/msdos.c b/src/msdos.c
index 3645dc8bb30..4367da4714d 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -420,6 +420,9 @@ static unsigned short outside_cursor;
/* The only display since MS-DOS does not support multiple ones. */
struct tty_display_info the_only_display_info;
+/* The only tty_output, since MS-DOS supports only 1 display. */
+struct tty_output the_only_tty_output;
+
/* Support for DOS/V (allows Japanese characters to be displayed on
standard, non-Japanese, ATs). Only supported for DJGPP v2 and later. */