From be628ab814f1c90e185d7482d27aa8a991ab5837 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Tue, 11 Apr 2017 21:05:12 -0400 Subject: Create gdb_termios.h (and cleanup gdb/{,gdbserver/}terminal.h) As requested, I'm sending this as a separate patch because it is ready to be included as-is. The idea here is that both gdb/terminal.h and gdb/gdbserver/terminal.h share the same code, which is responsible for setting a bunch of defines on based on the presence of termios.h and a few other headers. This simple patch just moves this common code to common/gdb_termios.h and makes the necessary adjustments on both GDB and gdbserver so that they can use this new header. It also implements the some header checks on common/common.m4. As a bonus, gdb/gdbserver/terminal.h can be removed because it's now empty. Built on x86_64, no regressions found. gdb/ChangeLog: 2017-04-12 Sergio Durigan Junior * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h". * common/common.m4: Check headers 'termios.h', 'termio.h' and 'sgtty.h'. * common/gdb_termios.h: New file, with parts of "terminal.h". * inflow.c: Include "gdb_termios.h". * ser-unix.c: Include "gdb_termios.h". * terminal.h: Move terminal-related defines to "common/gdb_termios.h". gdb/gdbserver/ChangeLog: 2017-04-12 Sergio Durigan Junior * remote-utils.c: Include "gdb_termios.h" instead of "terminal.h". * terminal.h: Delete file. --- gdb/Makefile.in | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/Makefile.in') diff --git a/gdb/Makefile.in b/gdb/Makefile.in index a5a5b42..291b1a0 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1497,6 +1497,7 @@ HFILES_NO_SRCDIR = \ common/gdb_setjmp.h \ common/gdb_signals.h \ common/gdb_sys_time.h \ + common/gdb_termios.h \ common/gdb_vecs.h \ common/gdb_wait.h \ common/host-defs.h \ -- cgit v1.1