[evolution-patches] small 64-bit cleanliness fixes



Hi,

I needed the attached small patch to get CVS evolution to not crash on
startup on an ia64 linux box (running Debian/unstable).

With the patch applied, I get the expected layout of windows and the
mail component seems to be working fine.  Other components don't seem
to work correctly yet, apparently because evolution is failing to load
the addressbook.  For example:

  (evolution-2.2:16582): evolution-addressbook-WARNING **: error loading addressbook : e_book_new: no factories available for uri `file:///home/davidm/.evolution/addressbook/local/system'

Anyhow, the reason evolution crashed on startup was that various
*get_type() routines got implicitly declared to return "int" when they
really return GType, which is 64 bits on 64-bit platforms.  As a
result, the top 32 bits of the GType got truncated away and when
attempting to dereference the truncated value, the program would
crash.

One caveat: in mail-component.c, I had to include
"em-format-html-display.h" later than the other "em-*" includes.
That's because it depends on some Gdk types which get defined only
later on.  You may want to handle that part differently.

Thanks,

	--david

Index: calendar/gui/main.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/main.c,v
retrieving revision 1.169
diff -u -r1.169 main.c
--- calendar/gui/main.c	4 Nov 2004 04:36:49 -0000	1.169
+++ calendar/gui/main.c	2 Dec 2004 01:03:23 -0000
@@ -47,6 +47,8 @@
 
 #include <e-util/e-plugin.h>
 #include "e-cal-config.h"
+#include "e-cal-popup.h"
+#include "e-cal-menu.h"
 
 #define FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_Factory:" BASE_VERSION
 
Index: mail/mail-component.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component.c,v
retrieving revision 1.101
diff -u -r1.101 mail-component.c
--- mail/mail-component.c	12 Nov 2004 05:54:07 -0000	1.101
+++ mail/mail-component.c	2 Dec 2004 01:03:39 -0000
@@ -35,11 +35,14 @@
 #include <fcntl.h>
 #include <errno.h>
 
+#include "em-config.h"
 #include "em-popup.h"
 #include "em-menu.h"
 #include "em-utils.h"
 #include "em-composer-utils.h"
+#include "em-event.h"
 #include "em-format.h"
+#include "em-format-hook.h"
 #include "em-folder-tree.h"
 #include "em-folder-browser.h"
 #include "em-message-browser.h"
@@ -83,6 +86,8 @@
 
 #include <bonobo/bonobo-control.h>
 #include <bonobo/bonobo-widget.h>
+
+#include "em-format-html-display.h"
 
 #define d(x) 
 
Index: shell/main.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/main.c,v
retrieving revision 1.163
diff -u -r1.163 main.c
--- shell/main.c	22 Nov 2004 20:52:05 -0000	1.163
+++ shell/main.c	2 Dec 2004 01:03:41 -0000
@@ -34,6 +34,7 @@
 
 #include "e-shell.h"
 #include "es-menu.h"
+#include "es-event.h"
 
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]