This is an updated patch which makes 'exult' compile with gcc-4.0 on amd64.

Regards
Andreas Jochens

diff -urN ../tmp-orig/exult-1.2/hash_utils.h ./hash_utils.h
--- ../tmp-orig/exult-1.2/hash_utils.h  2003-08-31 19:32:24.000000000 +0200
+++ ./hash_utils.h      2005-06-17 12:30:38.000000000 +0200
@@ -26,7 +26,7 @@
 #else
 #if HAVE_EXT_HASH_MAP
 #  include <ext/hash_map>
-#  if (defined(__GNUC__) && (__GNUC__ == 3) && ( __GNUC_MINOR__ > 0))
+#  if (defined(__GNUC__) && (((__GNUC__ == 3) && ( __GNUC_MINOR__ > 0)) || 
__GNUC__ >= 4))
 using __gnu_cxx::hash_map;
 #  else
 using std::hash_map;
@@ -44,7 +44,7 @@
 #else
 #if HAVE_EXT_HASH_SET
 #  include <ext/hash_set>
-#  if (defined(__GNUC__) && (__GNUC__ == 3) && ( __GNUC_MINOR__ > 0))
+#  if (defined(__GNUC__) && (((__GNUC__ == 3) && ( __GNUC_MINOR__ > 0)) || 
__GNUC__ >= 4))
 using __gnu_cxx::hash_set;
 #  else
 using std::hash_set;
diff -urN ../tmp-orig/exult-1.2/mapedit/npcedit.cc ./mapedit/npcedit.cc
--- ../tmp-orig/exult-1.2/mapedit/npcedit.cc    2004-04-26 06:59:14.000000000 
+0200
+++ ./mapedit/npcedit.cc        2005-06-17 12:30:38.000000000 +0200
@@ -234,7 +234,7 @@
        GtkLabel *label = GTK_LABEL(glade_xml_get_widget(app_xml, lname));
        g_free(lname);
                                        // User data = schedule #.
-       sched.type = (int) gtk_object_get_user_data(GTK_OBJECT(label));
+       sched.type = (long) gtk_object_get_user_data(GTK_OBJECT(label));
        if (sched.type < 0 || sched.type > 31)
                return false;
                                        // Get location.
@@ -600,7 +600,7 @@
        int shape = get_num_entry("npc_shape");
        int frame = get_num_entry("npc_frame");
        GtkWidget *fw = glade_xml_get_widget(app_xml, "npc_face_frame");
-       int face = (int) gtk_object_get_user_data(GTK_OBJECT(fw));
+       long face = (long) gtk_object_get_user_data(GTK_OBJECT(fw));
        int usecode = get_num_entry("npc_usecode_entry");
        short attack_mode = get_optmenu("npc_attack_mode");
        short alignment = get_optmenu("npc_alignment");
@@ -723,7 +723,7 @@
                return;
        npc_face_draw->configure();
        GtkWidget *frame = glade_xml_get_widget(app_xml, "npc_face_frame");
-       int shnum = (int) gtk_object_get_user_data(GTK_OBJECT(frame));
+       long shnum = (long) gtk_object_get_user_data(GTK_OBJECT(frame));
        npc_face_draw->draw_shape_centered(shnum, 0);
        if (w != -1)
                npc_face_draw->show(x, y, w, h);
diff -urN ../tmp-orig/exult-1.2/mapedit/studio.cc ./mapedit/studio.cc
--- ../tmp-orig/exult-1.2/mapedit/studio.cc     2004-04-26 06:32:13.000000000 
+0200
+++ ./mapedit/studio.cc 2005-06-17 12:30:38.000000000 +0200
@@ -2009,7 +2009,7 @@
        gpointer data
        )
        {
-       guint32 color = (guint32) gtk_object_get_user_data(GTK_OBJECT(widget));
+       guint32 color = (long) gtk_object_get_user_data(GTK_OBJECT(widget));
        GdkGC *gc = (GdkGC *) 
                        gtk_object_get_data(GTK_OBJECT(widget), "color_gc");
        if (!gc)
@@ -2071,7 +2071,7 @@
        config->set("config/estudio/default_game", default_game, true);
        GtkWidget *backgrnd = glade_xml_get_widget(app_xml, 
                                                        "prefs_background");
-       background_color = (guint32) gtk_object_get_user_data(
+       background_color = (long) gtk_object_get_user_data(
                                                GTK_OBJECT(backgrnd));
        config->set("config/estudio/background_color", background_color, true);
                                        // Set background color.
diff -urN ../tmp-orig/exult-1.2/mouse.h ./mouse.h
--- ../tmp-orig/exult-1.2/mouse.h       2003-08-31 19:32:24.000000000 +0200
+++ ./mouse.h   2005-06-17 12:35:29.000000000 +0200
@@ -27,6 +27,8 @@
 #include "vgafile.h"
 #include "glshape.h"
 
+class Game_window;
+
 /*
  *     Handle custom mouse pointers.
  */
diff -urN ../tmp-orig/exult-1.2/usecode/useval.cc ./usecode/useval.cc
--- ../tmp-orig/exult-1.2/usecode/useval.cc     2004-05-23 07:07:11.000000000 
+0200
+++ ./usecode/useval.cc 2005-06-17 12:30:38.000000000 +0200
@@ -464,7 +464,7 @@
                if (buflen < 5)
                        return -1;
                *ptr++ = type;
-               Write4(ptr, (int)value.ptr);
+               Write4(ptr, (long)value.ptr);
                break;
        case string_type:
                {


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to