GNOME Bugzilla – Bug 16866
xbill does not build on IRIX
Last modified: 2004-12-22 21:47:04 UTC
Package: gnome-games Version: 1.2.0 I recently build gnome-games/1.2.0 for SGI IRIX 6.x systems, and had to make a few changes. The diffs are below, but here's a summary: - ./gataxx/ataxx.c Fix typo, avoid using uninitialized variables. - ./gataxx/properties.c Match array dimensions. - ./gnometris/Makefile.am - ./gnometris/Makefile.in Avoid gcc-specific switches. - ./gtali/setup.c Use C comments in C code; not C++ comments. - ./xbill/Game.h - ./xbill/MCursor.cc - ./xbill/UI.cc - ./xbill/Game.cc Switch to an enum to placate the compiler. Add casts for the same reason. - ./glines/glines.c Add a close signal handler, use C comments. I hope that helps! Thanks, David --- ./gataxx/ataxx.c Wed Apr 14 21:57:23 1999 +++ ../gnome-games-1.2.0/./gataxx/ataxx.c Wed Jun 28 16:39:14 2000 @@ -231,7 +231,7 @@ xs[num_moves] = k; ys[num_moves] = l; weights[num_moves] = tmp; - num_maxes++;; + num_maxes++; num_moves++; } else if (tmp > maxpieces) { @@ -279,7 +279,7 @@ gint * tmplist; - gint num_maxes; + gint num_maxes = 0; not_me = (me == WHITE_TURN) ? BLACK_TURN : WHITE_TURN; @@ -383,7 +383,7 @@ gint * tmplist; - gint num_maxes; + gint num_maxes = 0; not_me = (me == WHITE_TURN) ? BLACK_TURN : WHITE_TURN; --- ./gataxx/properties.c Mon Apr 5 01:01:03 1999 +++ ../gnome-games-1.2.0/./gataxx/properties.c Wed Jun 28 16:39:41 2000 @@ -40,7 +40,7 @@ extern guint white_computer_id; extern gchar tile_set[255]; extern gchar tile_set_tmp[255]; -extern gint8 pixmaps[8][8]; +extern gint8 pixmaps[7][7]; extern gint animate; extern gint flip_pixmaps_id; extern gint flip_final; @@ -181,8 +181,8 @@ if (strcmp (tile_set, tile_set_tmp)) { strncpy (tile_set, tile_set_tmp, 255); load_pixmaps (); - for (i = 0; i < 8; i++) - for (j = 0; j < 8; j++) + for (i = 0; i < 7; i++) + for (j = 0; j < 7; j++) if (pixmaps [i][j] >= BLACK_TURN && pixmaps[i][j] <= WHITE_TURN) gui_draw_pixmap (pixmaps[i][j], i, j); --- ./gnometris/Makefile.am Thu Oct 7 16:30:12 1999 +++ ../gnome-games-1.2.0/./gnometris/Makefile.am Wed Jun 28 17:03:21 2000 @@ -2,7 +2,6 @@ scoredir=$(localstatedir)/games Gamesdir=$(datadir)/gnome/apps/Games -CPPFLAGS = -pedantic -Wall INCLUDES=\ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(GNOME_INCLUDEDIR) --- ./gnometris/Makefile.in Mon May 22 00:51:13 2000 +++ ../gnome-games-1.2.0/./gnometris/Makefile.in Wed Jun 28 17:03:27 2000 @@ -129,7 +129,6 @@ scoredir = $(localstatedir)/games Gamesdir = $(datadir)/gnome/apps/Games -CPPFLAGS = -pedantic -Wall INCLUDES = -DGNOMELOCALEDIR=\""$(datadir)/locale"\" $(GNOME_INCLUDEDIR) --- ./gtali/setup.c Sun Apr 18 18:28:29 1999 +++ ../gnome-games-1.2.0/./gtali/setup.c Thu Jun 29 14:08:37 2000 @@ -55,6 +55,7 @@ GyahtzeeAbort = 1; break; default: + break; } return; @@ -419,7 +420,7 @@ gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_SPREAD); - //gtk_button_box_set_child_ipadding (GTK_BUTTON_BOX (hbuttonbox1), 7, 5); + /*gtk_button_box_set_child_ipadding (GTK_BUTTON_BOX (hbuttonbox1), 7, 5);*/ button1 = gnome_stock_button(GNOME_STOCK_BUTTON_OK); gtk_object_set_data (GTK_OBJECT (window3), "button1", button1); @@ -444,9 +445,9 @@ gtk_widget_show (window3); - //sleep(10); + /*sleep(10);*/ - //gtk_widget_destroy(window3); + /*gtk_widget_destroy(window3);*/ return; } --- ./xbill/Game.h Thu Jun 3 05:39:58 1999 +++ ../gnome-games-1.2.0/./xbill/Game.h Wed Jun 28 16:41:37 2000 @@ -14,10 +14,7 @@ static const unsigned short scrwidth = 400; static const unsigned short scrheight = 400; - static const int PLAYING = 1; - static const int BETWEEN = 2; - static const int END = 3; - static const int WAITING = 4; + enum { PLAYING, BETWEEN, END, WAITING }; static const int DEFAULTC = 0; /* cursors */ static const int DOWNC = -1; --- ./xbill/MCursor.cc Sun Apr 30 05:03:38 2000 +++ ../gnome-games-1.2.0/./xbill/MCursor.cc Wed Jun 28 17:15:47 2000 @@ -2,7 +2,7 @@ #include "objects.h" void MCursor::load(const char *name, int masked) { - static char *dir = NULL; + static char *dir = (char*)NULL; GdkPixmap *pixmap, *bitmap, *mask; int width, height; char file[255]; @@ -11,7 +11,7 @@ sprintf (file, "%s/%s.xpm", dir, name); pixmap = gdk_pixmap_colormap_create_from_xpm(ui.display, ui.colormap, - &bitmap, NULL, file); + &bitmap, (GdkColor *)NULL, file); if (pixmap == NULL) { printf ("cannot open %s\n", file); exit(1); @@ -20,7 +20,7 @@ if (masked == SEP_MASK) { sprintf(file, "%s/%s_mask.xpm", dir, name); pixmap = gdk_pixmap_colormap_create_from_xpm(ui.display, ui.colormap, - &mask, NULL, file); + &mask, (GdkColor *)NULL, file); if (pixmap == NULL) { printf("cannot open %s\n", file); exit(1); --- ./xbill/UI.cc Thu May 4 08:25:37 2000 +++ ../gnome-games-1.2.0/./xbill/UI.cc Wed Jun 28 16:42:45 2000 @@ -126,10 +126,10 @@ void UI::popup_dialog (int dialog) { GtkWidget *w; - switch (dialog) { - case game.SCORE: w = scorebox; break; - case game.ENDGAME: w = endgamebox; break; - } + if (dialog == game.SCORE) + w = scorebox; + else if (dialog == game.ENDGAME) + w = endgamebox; popup (NULL, &w); } @@ -138,16 +138,14 @@ /*********************/ void UI::set_cursor(int cursor) { - switch (cursor) { - case game.BUCKETC: - gdk_window_set_cursor(window, bucket.cursor.cursor); break; - case game.DOWNC: - gdk_window_set_cursor(window, downcursor.cursor); break; - case game.DEFAULTC: - gdk_window_set_cursor(window, defaultcursor.cursor); break; - default: - gdk_window_set_cursor(window, OS.cursor[cursor].cursor); - } + if (cursor == game.BUCKETC) + gdk_window_set_cursor(window, bucket.cursor.cursor); + else if (cursor == game.DOWNC) + gdk_window_set_cursor(window, downcursor.cursor); + else if (cursor == game.DEFAULTC) + gdk_window_set_cursor(window, defaultcursor.cursor); + else + gdk_window_set_cursor(window, OS.cursor[cursor].cursor); } void UI::load_cursors() { --- ./xbill/Game.cc Thu Jun 3 06:04:21 1999 +++ ../gnome-games-1.2.0/./xbill/Game.cc Wed Jun 28 16:43:04 2000 @@ -61,10 +61,10 @@ } void Game::update_score (int action) { - switch (action){ - case ENDLEVEL: score+=(level*efficiency/iteration); break; - default: score+=(action*action*BILLPOINTS); - } + if (action == ENDLEVEL) + score+=(level*efficiency/iteration); + else + score+=(action*action*BILLPOINTS); } void Game::warp_to_level (unsigned int lev) { --- ./glines/glines.c Tue May 9 13:26:40 2000 +++ ../gnome-games-1.2.0/./glines/glines.c Wed Jun 28 16:43:33 2000 @@ -629,6 +629,8 @@ (const char **)authors, _("Gnome port of the once-popular Color Lines game"), "glines.xpm"); + gtk_signal_connect (GTK_OBJECT (about), "destroy", + GTK_SIGNAL_FUNC (gtk_widget_destroyed), &about); gnome_dialog_set_parent(GNOME_DIALOG(about), GTK_WINDOW(app)); gtk_widget_show (about); return TRUE; @@ -888,7 +890,7 @@ gtk_widget_show (vbox); - //gnome_app_set_contents (GNOME_APP (app), vbox); + /*gnome_app_set_contents (GNOME_APP (app), vbox);*/ gtk_widget_show (app); ------- Bug moved to this database by debbugs-export@bugzilla.gnome.org 2001-01-27 16:32 ------- This bug was previously known as bug 16866 at http://bugs.gnome.org/ http://bugs.gnome.org/show_bug.cgi?id=16866 Originally filed under the gnome-games product and general component. Unknown version 1.2.x in product gnome-games. Setting version to the default, "unspecified". The original reporter (drk@sgi.com) of this bug does not have an account here. Reassigning to the exporter, debbugs-export@bugzilla.gnome.org. Reassigning to the default owner of the component, bugmeister@canvas.gnome.org.
*** Bug 2578 has been marked as a duplicate of this bug. ***
It looks like everything but the xbill part has been fixed.
Yeah, i need to take a look at the xbill ones, i'm really not use about casting NULL.
Certainly confirmed as a real bug, but I haven't heard anything about getting the xbill changes into CVS.
Only putting GNOME2 because portability should be a high priority. Please close the bug, though, if the xbill fixes have gone in.
Anyone? Anyone? Rearranging priority/severity just because (1) apparently the original reporter is not replying to these bugs ATM and (2) it is IRIX ;) drk: please do let me know, either via bugzilla or email, if you are still involved.
I'm still here! Although I may not have been paying attention :-) Is there something you'd like me to test?
drk! Basically, boils down to 'does current CVS build for you? if not, could you update your patches?' I want to try to get your stuff in, but that would be easier if you reviewed and updated everything. Sound like a plan?
Or just send me a power supply for my Indy, and I'll test it. <grin />
I usually build from tarballs, not cvs, but I'll give it a try... Something isn't right with autoconf. It reports: configure.in:6: error: possibly undefined macro: AM_CONFIG_HEADER configure.in:7: error: possibly undefined macro: AM_INIT_AUTOMAKE configure.in:9: error: possibly undefined macro: AC_PROG_INTLTOOL configure.in:11: error: possibly undefined macro: AM_MAINTAINER_MODE configure.in:20: error: possibly undefined macro: AM_PROG_LIBTOOL configure.in:35: error: possibly undefined macro: AC_CHECK_CURSES configure.in:36: error: possibly undefined macro: AM_CONDITIONAL configure.in:42: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT Is there a conf'd version I can try?
Well, there are reasonably current tarballs at ftp://ftp.gnome.org/pub/GNOME/pre-gnome2/latest/sources/ [note the blithe assumption that you still want to help gnome2 and not gnome 1.4 :)
It looked familiar indeed ;) *** This bug has been marked as a duplicate of 52646 ***