binutils-gdb/gdb/tui
Rainer Orth 7a6e7fcc77 Fix tui compilation with Solaris libcurses: non-const last arg to mvwaddstr (PR tui/21482)
On both mainline and the 8.0 branch, gdb compilation fails on Solaris 10
with the native libcurses in gdb/tui for several instances of the same problem:

/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-winsource.c: In function `void tui_erase_source_content(tui_win_info*, int)':
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-winsource.c:257:18: error: invalid conversion from `const char*' to `char*' [-fpermissive]
        no_src_str);
                  ^
In file included from /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/gdb_curses.h:42:0,
                 from /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-data.h:26,
                 from /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-winsource.c:33:
/vol/gcc-7/lib/gcc/sparc-sun-solaris2.10/7.1.0/include-fixed/curses.h:699:12: note:   initializing argument 4 of `int mvwaddstr(WINDOW*, int, int, char*)'
 extern int mvwaddstr(WINDOW *, int, int, char *);
            ^~~~~~~~~
make[2]: *** [Makefile:1927: tui-winsource.o] Error 1

Unlike ncurses, <curses.h> declares

extern int mvwaddstr(WINDOW *, int, int, char *);

i.e. the last arg is char *, not const char *.

The patch fixes this by casting the last arg to mvwaddstr to char *,
as was recently done on mainline in a newterm() call (the only
difference between 8.0 and mainline gdb/tui).

	* tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
	arg to char *.
	* tui/tui-wingeneral.c (box_win): Likewise.
	* tui/tui-winsource.c (tui_erase_source_content): Likewise.
	(tui_show_source_line): Likewise.
	(tui_show_exec_info_content): Likewise.
2017-05-19 14:16:55 +02:00
..
ChangeLog-1998-2003
tui-command.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-command.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-data.c -Wwrite-strings: The Rest 2017-04-05 19:21:37 +01:00
tui-data.h -Wwrite-strings: The Rest 2017-04-05 19:21:37 +01:00
tui-disasm.c Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy 2017-02-02 11:11:47 +00:00
tui-disasm.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-file.c Fix PR tui/21216: TUI line breaks regression 2017-03-08 00:14:59 +00:00
tui-file.h Fix PR tui/21216: TUI line breaks regression 2017-03-08 00:14:59 +00:00
tui-hooks.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-hooks.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-interp.c C++-fy struct interp/cli_interp/tui_interp/mi_interp 2017-02-03 16:30:04 +00:00
tui-io.c Fix PR tui/21216: TUI line breaks regression 2017-03-08 00:14:59 +00:00
tui-io.h Fix PR tui/21216: TUI line breaks regression 2017-03-08 00:14:59 +00:00
tui-layout.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-layout.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-out.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-out.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-regs.c Fix "layout reg" crash 2017-03-07 13:54:02 +00:00
tui-regs.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-source.c -Wwrite-strings: The Rest 2017-04-05 19:21:37 +01:00
tui-source.h -Wwrite-strings: The Rest 2017-04-05 19:21:37 +01:00
tui-stack.c Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy 2017-02-02 11:11:47 +00:00
tui-stack.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-win.c -Wwrite-strings: The Rest 2017-04-05 19:21:37 +01:00
tui-win.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-windata.c Fix tui compilation with Solaris libcurses: non-const last arg to mvwaddstr (PR tui/21482) 2017-05-19 14:16:55 +02:00
tui-windata.h -Wwrite-strings: The Rest 2017-04-05 19:21:37 +01:00
tui-wingeneral.c Fix tui compilation with Solaris libcurses: non-const last arg to mvwaddstr (PR tui/21482) 2017-05-19 14:16:55 +02:00
tui-wingeneral.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui-winsource.c Fix tui compilation with Solaris libcurses: non-const last arg to mvwaddstr (PR tui/21482) 2017-05-19 14:16:55 +02:00
tui-winsource.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tui.c Avoid compiler warning in MinGW build 2017-05-13 11:10:00 +03:00
tui.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00