On both mainline and the 8.0 branch, gdb compilation fails on Solaris 10 with the native libcurses: * Initially, compilation failed like this: 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:2 6, from /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-disasm.c :31: /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-disasm.c: In function ‘CORE_A DDR tui_disassemble(gdbarch*, tui_asm_line*, CORE_ADDR, int)’: /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-disasm.c:71:19: error: ‘class string_file’ has no member named ‘wclear’; did you mean ‘clear’? gdb_dis_out.clear (); ^ /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-disasm.c:78:19: error: ‘class string_file’ has no member named ‘wclear’; did you mean ‘clear’? gdb_dis_out.clear (); ^ make[2]: *** [Makefile:1927: tui-disasm.o] Error 1 It turned out this happens because has #define clear() wclear(stdscr) This can be avoided by defining NOMACROS, which the patch below does for solaris2.*. * Even with this workaround, compilation fails 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, 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). With those changes, gdb on the 8.0 branch compiles cleanly on sparcv9-sun-solaris2.10 with native curses and amd64-pc-solaris2.12 with bundled ncurses (well, almost: on Solaris 12 ncurses in /usr/include is used, but gdb linked against -lcurses which fails: Undefined first referenced symbol in file wattr_on tui-wingeneral.o wattr_off tui-wingeneral.o but that's a different and preexisting problem). Ok for mainline and 8.0 branch? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2017-05-17 Rainer Orth PR tui/21482 * configure.ac (NOMACROS): Define. * configure: Regenerate. * config.in: Regenerate. * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr 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.