* [PATCH 2/2]: Fix clean compile on AIX 5.3
@ 2012-03-12 12:01 Chris January
2012-03-12 16:02 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Chris January @ 2012-03-12 12:01 UTC (permalink / raw)
To: gdb-patches
AIX curses doesn't define 'clear'. It should be #define clear()
wclear(stdscr), but this is missing from the headers. It can be worked
around by using erase and clearok, or maybe there is a better way?
2012-03-12 Chris January <chris.january@allinea.com>
* tui-tui.win.c (tui_resize_all): Use erase and clearok instead
of clear.
---
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index b48bf3e..d02cd7a 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -693,7 +693,8 @@ tui_resize_all (void)
cmd_split_diff++;
}
/* Now adjust each window. */
- clear ();
+ erase ();
+ clearok (curscr, TRUE);
refresh ();
switch (cur_layout)
{
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/2]: Fix clean compile on AIX 5.3
2012-03-12 12:01 [PATCH 2/2]: Fix clean compile on AIX 5.3 Chris January
@ 2012-03-12 16:02 ` Joel Brobecker
2012-03-12 19:50 ` Tom Tromey
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2012-03-12 16:02 UTC (permalink / raw)
To: Chris January; +Cc: gdb-patches
> AIX curses doesn't define 'clear'. It should be #define clear()
> wclear(stdscr), but this is missing from the headers. It can be worked
> around by using erase and clearok, or maybe there is a better way?
>
> 2012-03-12 Chris January <chris.january@allinea.com>
>
> * tui-tui.win.c (tui_resize_all): Use erase and clearok instead
> of clear.
I cannot help on this one, because I don't know curses much. But
I noticed that the filename in the ChangeLog entry was mistyped.
I would have also used a different subject, because some of the Global
Maintainers might skip this patch and leave it to me simply because
it is "AIX"... I suggest you send an email to cancel this patch/thread,
and send a new one with "TUI" in the subject.
> ---
> diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
> index b48bf3e..d02cd7a 100644
> --- a/gdb/tui/tui-win.c
> +++ b/gdb/tui/tui-win.c
> @@ -693,7 +693,8 @@ tui_resize_all (void)
> cmd_split_diff++;
> }
> /* Now adjust each window. */
> - clear ();
> + erase ();
> + clearok (curscr, TRUE);
> refresh ();
> switch (cur_layout)
> {
>
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/2]: Fix clean compile on AIX 5.3
2012-03-12 16:02 ` Joel Brobecker
@ 2012-03-12 19:50 ` Tom Tromey
2012-03-12 20:52 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2012-03-12 19:50 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Chris January, gdb-patches
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> I cannot help on this one, because I don't know curses much. But
Joel> I noticed that the filename in the ChangeLog entry was mistyped.
Me neither really, but a little reading convinced me that clear == erase
+ clearok; so this patch is ok.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2]: Fix clean compile on AIX 5.3
2012-03-12 19:50 ` Tom Tromey
@ 2012-03-12 20:52 ` Joel Brobecker
2012-03-12 21:04 ` Tom Tromey
2012-03-16 11:25 ` Chris January
0 siblings, 2 replies; 7+ messages in thread
From: Joel Brobecker @ 2012-03-12 20:52 UTC (permalink / raw)
To: Tom Tromey; +Cc: Chris January, gdb-patches
> Me neither really, but a little reading convinced me that clear == erase
> + clearok; so this patch is ok.
Perhaps a quick comment explaining that the two calls should not be
replaced by a "straightforward" call to "clear"?
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2]: Fix clean compile on AIX 5.3
2012-03-12 20:52 ` Joel Brobecker
@ 2012-03-12 21:04 ` Tom Tromey
2012-03-16 11:25 ` Chris January
1 sibling, 0 replies; 7+ messages in thread
From: Tom Tromey @ 2012-03-12 21:04 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Chris January, gdb-patches
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
>> Me neither really, but a little reading convinced me that clear == erase
>> + clearok; so this patch is ok.
Joel> Perhaps a quick comment explaining that the two calls should not be
Joel> replaced by a "straightforward" call to "clear"?
Seems smart to me.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2]: Fix clean compile on AIX 5.3
2012-03-12 20:52 ` Joel Brobecker
2012-03-12 21:04 ` Tom Tromey
@ 2012-03-16 11:25 ` Chris January
2012-03-16 18:22 ` Tom Tromey
1 sibling, 1 reply; 7+ messages in thread
From: Chris January @ 2012-03-16 11:25 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Tom Tromey, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
On Mon, 2012-03-12 at 13:52 -0700, Joel Brobecker wrote:
> > Me neither really, but a little reading convinced me that clear == erase
> > + clearok; so this patch is ok.
>
> Perhaps a quick comment explaining that the two calls should not be
> replaced by a "straightforward" call to "clear"?
Done. New patch attached.
[-- Attachment #2: aix-compile-2.patch --]
[-- Type: text/x-patch, Size: 489 bytes --]
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index b48bf3e..ea868c6 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -693,7 +693,10 @@ tui_resize_all (void)
cmd_split_diff++;
}
/* Now adjust each window. */
- clear ();
+ /* erase + clearok are used instead of a straightforward clear as
+ AIX 5.3 does not define clear. */
+ erase ();
+ clearok (curscr, TRUE);
refresh ();
switch (cur_layout)
{
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-16 18:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 12:01 [PATCH 2/2]: Fix clean compile on AIX 5.3 Chris January
2012-03-12 16:02 ` Joel Brobecker
2012-03-12 19:50 ` Tom Tromey
2012-03-12 20:52 ` Joel Brobecker
2012-03-12 21:04 ` Tom Tromey
2012-03-16 11:25 ` Chris January
2012-03-16 18:22 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox