Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [COMMIT] Fix compilations problem on sparc-sun-solaris2.9
@ 2004-11-15  9:48 Mark Kettenis
  2004-11-15 16:29 ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2004-11-15  9:48 UTC (permalink / raw)
  To: gdb-patches

[Message didn't get out to the list last friday, sorry.]

Fallout from the recent term.h fix related to Solaris header
brandamage.  AFAICT "terminal.h" isn't necessary at all in tui-io.c,
so I removed it.  Let's hope there isn't another braindamages systems
that needs it.

Mark


Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.6615
diff -u -p -u -p -r1.6615 ChangeLog
--- ChangeLog	12 Nov 2004 01:00:34 -0000	1.6615
+++ ChangeLog	12 Nov 2004 16:04:34 -0000
@@ -1,3 +1,8 @@
+2004-11-12  Mark Kettenis  <kettenis@jive.nl>
+
+	* tui/tui-io.c: Don't include "terminal.h".
+	* Makefile.in (tui-io.o): Update dependencies.
+
 2004-11-12  Kei Sakamoto  <sakamoto.kei@renesas.com>
 
 	* Makefile.in (m32r-linux-tdep.o): Update dependencies.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.663
diff -u -p -u -p -r1.663 Makefile.in
--- Makefile.in	12 Nov 2004 01:00:41 -0000	1.663
+++ Makefile.in	12 Nov 2004 16:04:34 -0000
@@ -3036,7 +3036,7 @@ tui-interp.o: $(srcdir)/tui/tui-interp.c
 	$(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \
 	$(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
-tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \
+tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(target_h) \
 	$(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(tui_h) \
 	$(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \
 	$(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \
Index: tui/tui-io.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-io.c,v
retrieving revision 1.11
diff -u -p -u -p -r1.11 tui-io.c
--- tui/tui-io.c	21 Apr 2004 23:52:21 -0000	1.11
+++ tui/tui-io.c	12 Nov 2004 16:04:34 -0000
@@ -23,7 +23,6 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "terminal.h"
 #include "target.h"
 #include "event-loop.h"
 #include "event-top.h"


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [COMMIT] Fix compilations problem on sparc-sun-solaris2.9
  2004-11-15  9:48 [COMMIT] Fix compilations problem on sparc-sun-solaris2.9 Mark Kettenis
@ 2004-11-15 16:29 ` Joel Brobecker
  2004-11-15 18:11   ` Mark Kettenis
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2004-11-15 16:29 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

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

> Fallout from the recent term.h fix related to Solaris header
> brandamage.  AFAICT "terminal.h" isn't necessary at all in tui-io.c,
> so I removed it.  Let's hope there isn't another braindamages systems
> that needs it.

Do you remember the error that you had without your fix? On our side,
we had a failure on this platform too:

> In file included from gdb_curses.h:38,
>                  from tui/tui-data.h:29,
>                  from tui/tui-io.c:33:
> /usr/include/term.h:1060: field `Ottyb' has incomplete type
> /usr/include/term.h:1061: field `Nttyb' has incomplete type
> make[1]: *** [tui-io.o] Error 1

We had a patch that I was testing on all our native configuration.
It looks like I can dump it, but I wanted to make sure you address
the same problem.

Thanks!
-- 
Joel

[-- Attachment #2: gdb_curses.diff --]
[-- Type: text/plain, Size: 889 bytes --]

Index: gdb/gdb_curses.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb_curses.h,v
retrieving revision 1.4
diff -c -p -r1.4 gdb_curses.h
*** gdb/gdb_curses.h	9 Nov 2004 00:59:03 -0000	1.4
--- gdb/gdb_curses.h	12 Nov 2004 02:35:21 -0000
***************
*** 35,40 ****
--- 35,49 ----
  #if defined (HAVE_NCURSES_TERM_H)
  #include <ncurses/term.h>
  #elif defined (HAVE_TERM_H)
+ #ifdef HAVE_TERMIO_H
+ /* Some definitions from termio are sometimes needed for term.h.
+    For instance, on Solaris 2.8, strm term contains two fields
+    named Ottyb and Nttyb of type SGTTY, which is defined as a
+    typedef of struct termio in term.h.  Without including term.h,
+    the compiler has an incomplete definition of the type of these
+    two fields, and aborts the builds.  */
+ #include <termio.h>
+ #endif
  #include <term.h>
  #endif
  

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [COMMIT] Fix compilations problem on sparc-sun-solaris2.9
  2004-11-15 16:29 ` Joel Brobecker
@ 2004-11-15 18:11   ` Mark Kettenis
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2004-11-15 18:11 UTC (permalink / raw)
  To: brobecker; +Cc: gdb-patches

   Date: Mon, 15 Nov 2004 08:29:05 -0800
   From: Joel Brobecker <brobecker@gnat.com>

   > Fallout from the recent term.h fix related to Solaris header
   > brandamage.  AFAICT "terminal.h" isn't necessary at all in tui-io.c,
   > so I removed it.  Let's hope there isn't another braindamages systems
   > that needs it.

   Do you remember the error that you had without your fix? On our side,
   we had a failure on this platform too:

   > In file included from gdb_curses.h:38,
   >                  from tui/tui-data.h:29,
   >                  from tui/tui-io.c:33:
   > /usr/include/term.h:1060: field `Ottyb' has incomplete type
   > /usr/include/term.h:1061: field `Nttyb' has incomplete type
   > make[1]: *** [tui-io.o] Error 1

Yup, that's exactly the problem I was getting.

   We had a patch that I was testing on all our native configuration.
   It looks like I can dump it, but I wanted to make sure you address
   the same problem.

I did consider something like your patch too, but it didn't feel
right, although it probably is a bit more robust.  We can always
consider something like that if the need arises.

Cheers,

Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-15 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-15  9:48 [COMMIT] Fix compilations problem on sparc-sun-solaris2.9 Mark Kettenis
2004-11-15 16:29 ` Joel Brobecker
2004-11-15 18:11   ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox