[evolution-patches] Patches for evolution-data-server-1.3.6.1



Hi all,

Here are a few patches that we currently have in the SUSE build system.
They all apply cleanly to evolution-data-server-1.6.3.1.

Most of them are to fix compiler warnings for 64-bit cleanliness, gcc4,
use of uninitialized variables, and adding #includes for the
D_FORTIFY_SOURCE=2 feature of gcc4. The fortify source feature of gcc4
lets the compiler check for buffer overflows, but in order to do that it
requires that all the correct #includes be present.

Most of these patches aren't my own work, but I'll take credit for the
good ones.

-Gary
diff -pruN -x '*~' evolution-data-server-1.2.1-orig/camel/providers/groupwise/camel-groupwise-folder.c evolution-data-server-1.2.1/camel/providers/groupwise/camel-groupwise-folder.c
--- evolution-data-server-1.2.1-orig/camel/providers/groupwise/camel-groupwise-folder.c	Tue Mar 15 02:26:40 2005
+++ evolution-data-server-1.2.1/camel/providers/groupwise/camel-groupwise-folder.c	Wed Mar 16 13:21:25 2005
@@ -44,6 +44,7 @@
 #include "camel-groupwise-journal.h"
 #include "camel-groupwise-utils.h"
 #include "camel-stream-mem.h"
+#include "camel-string-utils.h"
 #include <e-gw-connection.h>
 #include <e-gw-item.h>
 
--- calendar/backends/contacts/e-cal-backend-contacts.c
+++ calendar/backends/contacts/e-cal-backend-contacts.c
@@ -377,7 +377,7 @@
 static struct icaltimetype
 cdate_to_icaltime (EContactDate *cdate)
 {
-	struct icaltimetype ret;
+	struct icaltimetype ret = icaltime_null_time();
 
 /*FIXME: this is a really _ugly_ (temporary) hack
  *	since several functions are still depending on the epoch,
--- calendar/backends/groupwise/e-cal-backend-groupwise-utils.h
+++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.h
@@ -37,6 +37,7 @@
  * Items management
  */
 EGwItem       *e_gw_item_new_from_cal_component (const char *container, ECalBackendGroupwise *cbgw, ECalComponent *comp);
+EGwItem  *e_gw_item_new_for_delegate_from_cal (ECalBackendGroupwise *cbgw, ECalComponent *comp);
 ECalComponent *e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw);
 void          e_gw_item_set_changes (EGwItem *item, EGwItem *cached_item);
 
--- camel/providers/groupwise/camel-groupwise-folder.c
+++ camel/providers/groupwise/camel-groupwise-folder.c
@@ -504,7 +504,7 @@
 {
 	CamelFolder *dest;
 	GPtrArray *uids;
-	CamelException *ex;
+	CamelException *ex = NULL;
 	const char *uid = camel_message_info_uid (info);
 	
 	uids = g_ptr_array_new ();
@@ -528,7 +528,7 @@
 	CamelFolder *dest;
 	CamelFolderInfo *fi;
 	GPtrArray *uids;
-	CamelException *ex;
+	CamelException *ex = NULL;
 	const char *uid = camel_message_info_uid (info);
 	
 	uids = g_ptr_array_new ();
@@ -1174,6 +1174,12 @@
 	}
 
 	groupwise_populate_msg_body_from_item (cnc, multipart, item, body);
+
+	container_id = g_strdup (camel_groupwise_store_container_id_lookup (gw_store, folder->name));
+	if (!container_id) {
+		g_error ("\nERROR - Container id not present. Cannot refresh info\n");
+		return NULL;
+	}
 	
 	/*Set recipient details*/
 	groupwise_msg_set_recipient_list (msg, item);
--- camel/providers/groupwise/camel-groupwise-summary.c
+++ camel/providers/groupwise/camel-groupwise-summary.c
@@ -249,7 +249,7 @@
 	old = mi->flags;
 	/* we don't set flags which aren't appropriate for the folder*/
 	if ((set == (CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN|CAMEL_MESSAGE_SEEN)) && (old & CAMEL_GW_MESSAGE_JUNK))
-		return ;
+		return FALSE;
 	
 	mi->flags = (old & ~flags) | (set & flags);
 	if (old != mi->flags) {
--- camel/providers/imap/camel-imap-store.c
+++ camel/providers/imap/camel-imap-store.c
@@ -669,6 +669,9 @@
 	}
 	
 #ifdef HAVE_SSL
+	/* as soon as we send a STARTTLS command, all hope is lost of a clean QUIT if problems arise */
+	clean_quit = FALSE;
+	
 	if (!(store->capabilities & IMAP_CAPABILITY_STARTTLS)) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Failed to connect to IMAP server %s in secure mode: %s"),
@@ -677,9 +680,6 @@
 		goto exception;
 	}
 	
-	/* as soon as we send a STARTTLS command, all hope is lost of a clean QUIT if problems arise */
-	clean_quit = FALSE;
-	
 	response = camel_imap_command (store, NULL, ex, "STARTTLS");
 	if (!response) {
 		camel_object_unref (store->istream);
--- camel/providers/pop3/camel-pop3-store.c
+++ camel/providers/pop3/camel-pop3-store.c
@@ -213,6 +213,9 @@
 	}
 	
 #ifdef HAVE_SSL
+	/* as soon as we send a STLS command, all hope is lost of a clean QUIT if problems arise */
+	clean_quit = FALSE;
+
 	if (!(store->engine->capa & CAMEL_POP3_CAP_STLS)) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Failed to connect to POP server %s in secure mode: %s"),
@@ -220,9 +223,6 @@
 		goto stls_exception;
 	}
 	
-	/* as soon as we send a STLS command, all hope is lost of a clean QUIT if problems arise */
-	clean_quit = FALSE;
-	
 	pc = camel_pop3_engine_command_new (store->engine, 0, NULL, NULL, "STLS\r\n");
 	while (camel_pop3_engine_iterate (store->engine, NULL) > 0)
 		;
--- libdb/dbm/dbm.c
+++ libdb/dbm/dbm.c
@@ -128,7 +128,8 @@
 
 	if (__cur_db == NULL) {
 		__db_no_open();
-		item.dptr = 0;
+		item.dptr = NULL;
+		item.dsize = 0;
 		return (item);
 	}
 	return (dbm_fetch(__cur_db, key));
@@ -141,7 +142,8 @@
 
 	if (__cur_db == NULL) {
 		__db_no_open();
-		item.dptr = 0;
+		item.dptr = NULL;
+		item.dsize = 0;
 		return (item);
 	}
 	return (dbm_firstkey(__cur_db));
@@ -157,7 +159,8 @@
 
 	if (__cur_db == NULL) {
 		__db_no_open();
-		item.dptr = 0;
+		item.dptr = NULL;
+		item.dsize = 0;
 		return (item);
 	}
 	return (dbm_nextkey(__cur_db));
--- configure.in
+++ configure.in
@@ -295,6 +295,8 @@
 ],ac_cv_lkstrftime=no,ac_cv_lkstrftime=no])
 AC_MSG_RESULT($ac_cv_lkstrftime)
 
+PKG_PROG_PKG_CONFIG
+
 dnl ********************************************************************************
 dnl security extension support (SSL and S/MIME)
 dnl
--- docs/reference/addressbook/libebook/libebook.types
+++ docs/reference/addressbook/libebook/libebook.types
@@ -1,4 +1,10 @@
 #include <glib-object.h>
+#include <libebook/e-book.h>
+#include <libebook/e-book-view.h>
+#include <libebook/e-book-listener.h>
+#include <libebook/e-book-view-listener.h>
+#include <libebook/e-contact.h>
+#include <libebook/e-vcard.h>
 e_book_listener_get_type
 e_book_view_listener_get_type
 e_book_view_get_type
--- docs/reference/calendar/libecal/libecal.types
+++ docs/reference/calendar/libecal/libecal.types
@@ -1,4 +1,9 @@
 #include <glib-object.h>
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-component.h>
+#include <libecal/e-cal-listener.h>
+#include <libecal/e-cal-view.h>
+#include <libecal/e-cal-view-listener.h>
 e_cal_get_type
 e_cal_view_get_type
 e_cal_listener_get_type
--- docs/reference/calendar/libedata-cal/libedata-cal.types
+++ docs/reference/calendar/libedata-cal/libedata-cal.types
@@ -1,4 +1,12 @@
 #include <glib-object.h>
+#include <libedata-cal/e-cal-backend-cache.h>
+#include <libedata-cal/e-cal-backend-factory.h>
+#include <libedata-cal/e-cal-backend-sexp.h>
+#include <libedata-cal/e-cal-backend-sync.h>
+#include <libedata-cal/e-cal-backend.h>
+#include <libedata-cal/e-data-cal-factory.h>
+#include <libedata-cal/e-data-cal-view.h>
+#include <libedata-cal/e-data-cal.h>
 e_cal_backend_cache_get_type
 e_cal_backend_factory_get_type
 e_cal_backend_sexp_get_type
--- libedataserverui/e-name-selector-dialog.c
+++ libedataserverui/e-name-selector-dialog.c
@@ -30,6 +30,8 @@
 #include <gtk/gtklabel.h>
 #include <gtk/gtkscrolledwindow.h>
 #include <gtk/gtkstock.h>
+#include <gtk/gtkcellrenderertext.h>
+#include <glib/gstrfuncs.h>
 #include <glib/gi18n-lib.h>
 #include <libedataserverui/e-source-option-menu.h>
 #include <libedataserverui/e-destination-store.h>
--- addressbook/backends/ldap/e-book-backend-ldap.c
+++ addressbook/backends/ldap/e-book-backend-ldap.c
@@ -594,7 +594,7 @@
 	struct timeval timeout;
 
 	if (!ldap)
-		return;
+		return LDAP_OTHER;
 
 	attrs[i++] = "supportedControl";
 	attrs[i++] = "supportedExtension";
--- camel/providers/local/camel-local-store.c
+++ camel/providers/local/camel-local-store.c
@@ -300,8 +300,8 @@
 static int xrename(const char *oldp, const char *newp, const char *prefix, const char *suffix, int missingok, CamelException *ex)
 {
 	struct stat st;
-	char *old = g_strconcat(prefix, oldp, suffix, 0);
-	char *new = g_strconcat(prefix, newp, suffix, 0);
+	char *old = g_strconcat(prefix, oldp, suffix, NULL);
+	char *new = g_strconcat(prefix, newp, suffix, NULL);
 	int ret = -1;
 	int err = 0;
 


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