Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Fix tui compilation with Solaris libcurses (PR tui/21482)
Date: Fri, 19 May 2017 12:50:00 -0000	[thread overview]
Message-ID: <yddlgptxb7l.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <yddr2zmz3qc.fsf@CeBiTec.Uni-Bielefeld.DE> (Rainer Orth's message	of "Thu, 18 May 2017 15:36:27 +0200")

[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]

Hi Pedro,

>>> Ok for mainline and 8.0 branch?
>>
>> The cast bits are OK.  I'd like to hear your opinion on
>> moving the NOMACROS define to gdb_curses.h, before including
>> <curses.h>.
>
> The move makes sense to me: I just wasn't aware of that file.  I'll
> prepare a separate patch.

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?

Interestingly, with that patch the previous link failure on Solaris
11/12 (missing wattr_on/wattr_off) is gone, too.  This seems to happen
because <ncurses/ncurses.h> no longer defines

/usr/include/ncurses/ncurses.h:#define wattron(win,at)          wattr_on(win, NCURSES_CAST(attr_t, at), NULL)
/usr/include/ncurses/ncurses.h:#define attr_on(a,o)             wattr_on(stdscr,a,o)

and the references to wattron can be satisfied from libcurses just as
from libncurses.

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR tui/21482
	* gdb_curses.h (NOMACROS): Define.
	(NCURSES_NOMACROS): Define.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-gdb-tui-curses-clear.patch --]
[-- Type: text/x-patch, Size: 693 bytes --]

# HG changeset patch
# Parent  32840d58190409875fc9d8590fcb97eafaaeeca3
Fix tui compilation with Solaris libcurses: clear define (PR tui/21482)

diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h
--- a/gdb/gdb_curses.h
+++ b/gdb/gdb_curses.h
@@ -32,6 +32,13 @@
 #undef KEY_EVENT
 #endif
 
+/* On Solaris and probably other SysVr4 derived systems, we need to define
+   NOMACROS so the native <curses.h> doesn't define clear which interferes
+   with the clear member of class string_file.  ncurses potentially has a
+   similar problem and fix.  */
+#define NOMACROS
+#define NCURSES_NOMACROS
+
 #if defined (HAVE_NCURSES_NCURSES_H)
 #include <ncurses/ncurses.h>
 #elif defined (HAVE_NCURSES_H)

  reply	other threads:[~2017-05-19 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18  8:56 Rainer Orth
2017-05-18 13:19 ` Pedro Alves
2017-05-18 13:36   ` Rainer Orth
2017-05-19 12:50     ` Rainer Orth [this message]
2017-05-19 12:52       ` Pedro Alves
2017-05-19 13:20       ` Eli Zaretskii
2017-05-19 13:26         ` Rainer Orth
2017-05-19 13:43           ` Pedro Alves
2017-05-19 13:39         ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yddlgptxb7l.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox