Fix tui compilation with Solaris libcurses (PR tui/21482)

Pedro Alves palves@redhat.com
Fri May 19 13:43:00 GMT 2017


On 05/19/2017 02:26 PM, Rainer Orth wrote:
> Hi Eli,
> 
>>> I've checked in the cast part now.  Here's the NOMACROS part for
>>> gdb_curses.h.  Tested as before on sparcv9-sun-solaris2.10 (curses) and
>>> amd64-pc-solaris2.12 (ncurses).  Ok too?
>>
>> I think this should be guarded by some OS-specific macro, so as not to
>> affect other platforms, where the original problem doesn't exist.  (I
>> see 6 instances of these macros being tested in my ncurses headers,
>> and I'm not on Solaris.)  Who knows what new problems this could cause?
> 
> that's what I had done initially (via configure.ac for solaris2.* only),
> but Pedro suggested to do it unconditionally since some other targets
> (AIX notably) seem to be having the same problem.

Yes, and it's not host specific, but really curses-implementation
specific.  On the same host you may compile against different versions
of curses (BSD curses, ncurses, pdcurses, etc.).  I don't see any
benefit to complicate things when we have no evidence that telling
curses to avoid defining its symbols as macros causes problems.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list