Index: plugins/groupwise-features/send-options.c
===================================================================
--- plugins/groupwise-features/send-options.c	(revision 36829)
+++ plugins/groupwise-features/send-options.c	(working copy)
@@ -454,7 +454,7 @@
 		if (gopts->delay_enabled) {
 				tt = icaltime_today ();
 				icaltime_adjust (&tt, gopts->delay_until, 0, 0, 0);
-				val = icaltime_as_ical_string (tt);
+				val = icaltime_as_ical_string_r (tt);
 		} else
 			val = "none";
 		e_source_set_property (source, "delay-delivery", val);
Index: plugins/save-calendar/ical-format.c
===================================================================
--- plugins/save-calendar/ical-format.c	(revision 36829)
+++ plugins/save-calendar/ical-format.c	(working copy)
@@ -136,7 +136,7 @@
 		stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target->selector))), dest_uri, &error);
 
 		if (stream) {
-			char *ical_str = icalcomponent_as_ical_string (top_level);
+			char *ical_str = icalcomponent_as_ical_string_r (top_level);
 
 			g_output_stream_write_all (stream, ical_str, strlen (ical_str), NULL, NULL, &error);
 			g_output_stream_close (stream, NULL, NULL);
Index: plugins/ipod-sync/ical-format.c
===================================================================
--- plugins/ipod-sync/ical-format.c	(revision 36829)
+++ plugins/ipod-sync/ical-format.c	(working copy)
@@ -89,7 +89,7 @@
 		stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target->selector))), dest_uri, &error);
 
 		if (stream && !error) {
-			char *ical_str = icalcomponent_as_ical_string (top_level);
+			char *ical_str = icalcomponent_as_ical_string_r (top_level);
 
 			g_output_stream_write_all (stream, ical_str, strlen (ical_str), NULL, NULL, &error);
 			g_output_stream_close (stream, NULL, NULL);
Index: plugins/itip-formatter/itip-formatter.c
===================================================================
--- plugins/itip-formatter/itip-formatter.c	(revision 36829)
+++ plugins/itip-formatter/itip-formatter.c	(working copy)
@@ -169,7 +169,7 @@
 		char *attendee;
 		char *text;
 
-		attendee = icalproperty_get_value_as_string (prop);
+		attendee = icalproperty_get_value_as_string_r (prop);
 
 		 if (!attendee)
 			continue;
@@ -253,7 +253,7 @@
 				if (param)
 					pitip->to_name = g_strdup (icalparameter_get_cn (param));
 
-				text = icalproperty_get_value_as_string (prop);
+				text = icalproperty_get_value_as_string_r (prop);
 
 				pitip->to_address = g_strdup (itip_strip_mailto (text));
 				g_free (text);
@@ -309,7 +309,7 @@
 				if (param)
 					pitip->to_name = g_strdup (icalparameter_get_cn (param));
 
-				text = icalproperty_get_value_as_string (prop);
+				text = icalproperty_get_value_as_string_r (prop);
 
 				pitip->to_address = g_strdup (itip_strip_mailto (text));
 				g_free (text);
@@ -352,7 +352,7 @@
 	if (!prop)
 		return;
 
-	organizer = icalproperty_get_value_as_string (prop);
+	organizer = icalproperty_get_value_as_string_r (prop);
 	if (organizer) {
 		organizer_clean = g_strdup (itip_strip_mailto (organizer));
 		organizer_clean = g_strstrip (organizer_clean);
@@ -981,7 +981,7 @@
 	 * and you then look at it in Outlook).
 	 */
 	stamp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
-	str = icaltime_as_ical_string (stamp);
+	str = icaltime_as_ical_string_r (stamp);
 	prop = icalproperty_new_x (str);
 	g_free (str);
 	icalproperty_set_x_name (prop, "X-MICROSOFT-CDO-REPLYTIME");
Index: plugins/publish-calendar/publish-format-fb.c
===================================================================
--- plugins/publish-calendar/publish-format-fb.c	(revision 36829)
+++ plugins/publish-calendar/publish-format-fb.c	(working copy)
@@ -84,7 +84,7 @@
 			objects = g_list_remove (objects, comp);
 		}
 
-		ical_string = icalcomponent_as_ical_string (top_level);
+		ical_string = icalcomponent_as_ical_string_r (top_level);
 		res = g_output_stream_write_all (stream, ical_string, strlen (ical_string), NULL, NULL, &error);
 
 		g_free (ical_string);
Index: plugins/publish-calendar/publish-format-ical.c
===================================================================
--- plugins/publish-calendar/publish-format-ical.c	(revision 36829)
+++ plugins/publish-calendar/publish-format-ical.c	(working copy)
@@ -113,7 +113,7 @@
 		g_hash_table_destroy (tdata.zones);
 		tdata.zones = NULL;
 
-		ical_string = icalcomponent_as_ical_string (top_level);
+		ical_string = icalcomponent_as_ical_string_r (top_level);
 		res = g_output_stream_write_all (stream, ical_string, strlen (ical_string), NULL, NULL, &error);
 		g_free (ical_string);
 	}
Index: calendar/gui/dialogs/e-send-options-utils.c
===================================================================
--- calendar/gui/dialogs/e-send-options-utils.c	(revision 36829)
+++ calendar/gui/dialogs/e-send-options-utils.c	(working copy)
@@ -192,7 +192,7 @@
 			icaltimezone *zone = calendar_config_get_icaltimezone ();
 			temp = icaltime_from_timet_with_zone (gopts->delay_until, FALSE, zone);
 
-			str = icaltime_as_ical_string (temp);
+			str = icaltime_as_ical_string_r (temp);
 			prop = icalproperty_new_x (str);
 			g_free (str);
 			icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-DELAY");
Index: calendar/gui/e-memos.c
===================================================================
--- calendar/gui/e-memos.c	(revision 36829)
+++ calendar/gui/e-memos.c	(working copy)
@@ -405,7 +405,7 @@
 		e_cal_util_add_timezones_from_component (vcal, comp_data->icalcomp);
 		icalcomponent_add_component (vcal, icalcomponent_new_clone (comp_data->icalcomp));
 
-		comp_str = icalcomponent_as_ical_string (vcal);
+		comp_str = icalcomponent_as_ical_string_r (vcal);
 		if (comp_str) {
 			ESource *source = e_cal_get_source (comp_data->client);
 			const char *source_uid = e_source_peek_uid (source);
Index: calendar/gui/e-day-view.c
===================================================================
--- calendar/gui/e-day-view.c	(revision 36829)
+++ calendar/gui/e-day-view.c	(working copy)
@@ -565,7 +565,7 @@
 
 		prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY);
 		if (prop)
-			rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+			rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 	}
 
 	if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num))
@@ -659,7 +659,7 @@
 
 			prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY);
 			if (prop)
-				rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+				rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 		}
 
 		if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num))
@@ -1969,7 +1969,7 @@
 			u = icalcomponent_get_uid (event->comp_data->icalcomp);
 			if (u && !strcmp (uid, u)) {
 				if (rid && *rid) {
-					r = icaltime_as_ical_string (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
+					r = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
 					if (!r || !*r)
 						continue;
 					if (strcmp (rid, r) != 0) {
@@ -4514,7 +4514,7 @@
 
 		e_day_view_reshape_day_event (day_view, day, event_num);
 		event = &g_array_index (day_view->events[day], EDayViewEvent, event_num);
-		current_comp_string = icalcomponent_as_ical_string (event->comp_data->icalcomp);
+		current_comp_string = icalcomponent_as_ical_string_r (event->comp_data->icalcomp);
 		if (day_view->last_edited_comp_string == NULL) {
 			g_free (current_comp_string);
 			continue;
@@ -7313,7 +7313,7 @@
 		e_cal_util_add_timezones_from_component (vcal, event->comp_data->icalcomp);
 		icalcomponent_add_component (vcal, icalcomponent_new_clone (event->comp_data->icalcomp));
 
-		comp_str = icalcomponent_as_ical_string (vcal);
+		comp_str = icalcomponent_as_ical_string_r (vcal);
 		if (comp_str) {
 			gtk_selection_data_set (selection_data, selection_data->target,
 						8, (unsigned char *)comp_str, strlen (comp_str));
Index: calendar/gui/itip-utils.c
===================================================================
--- calendar/gui/itip-utils.c	(revision 36829)
+++ calendar/gui/itip-utils.c	(working copy)
@@ -828,7 +828,7 @@
 			continue;
 		}
 
-		attendee = icalproperty_get_value_as_string (prop);
+		attendee = icalproperty_get_value_as_string_r (prop);
 		if (!attendee)
 			continue;
 
@@ -1202,7 +1202,7 @@
 	content_type = comp_content_type (comp, method);
 
 	top_level = comp_toplevel_with_zones (method, comp, client, zones);
-	ical_string = icalcomponent_as_ical_string (top_level);
+	ical_string = icalcomponent_as_ical_string_r (top_level);
 
 	if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_EVENT) {
 		e_msg_composer_set_body (composer, ical_string, content_type);
@@ -1307,7 +1307,7 @@
 	e_destination_freev (destinations);
 
 	top_level = comp_toplevel_with_zones (method, comp, client, zones);
-	ical_string = icalcomponent_as_ical_string (top_level);
+	ical_string = icalcomponent_as_ical_string_r (top_level);
 
 	if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_EVENT){
 
@@ -1617,7 +1617,7 @@
 	}
 
 	soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
-	ical_string = icalcomponent_as_ical_string (toplevel);
+	ical_string = icalcomponent_as_ical_string_r (toplevel);
 	soup_message_set_request (msg, "text/calendar", SOUP_MEMORY_TEMPORARY,
 				  ical_string, strlen (ical_string));
 
Index: calendar/gui/e-itip-control.c
===================================================================
--- calendar/gui/e-itip-control.c	(revision 36829)
+++ calendar/gui/e-itip-control.c	(working copy)
@@ -1955,7 +1955,7 @@
 	 * and you then look at it in Outlook).
 	 */
 	stamp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
-	str = icaltime_as_ical_string (stamp);
+	str = icaltime_as_ical_string_r (stamp);
 	prop = icalproperty_new_x (str);
 	g_free (str);
 	icalproperty_set_x_name (prop, "X-MICROSOFT-CDO-REPLYTIME");
Index: calendar/gui/gnome-cal.c
===================================================================
--- calendar/gui/gnome-cal.c	(revision 36829)
+++ calendar/gui/gnome-cal.c	(working copy)
@@ -4005,7 +4005,7 @@
 					struct icaltimetype recur_id = icalcomponent_get_recurrenceid (m->data);
 
 					if (!icaltime_is_null_time (recur_id) )
-						rid = icaltime_as_ical_string (recur_id);
+						rid = icaltime_as_ical_string_r (recur_id);
 
 					e_cal_remove_object_with_mod (client, uid, rid, CALOBJ_MOD_ALL, &error);
 					g_free (rid);
Index: calendar/gui/e-tasks.c
===================================================================
--- calendar/gui/e-tasks.c	(revision 36829)
+++ calendar/gui/e-tasks.c	(working copy)
@@ -502,7 +502,7 @@
 		e_cal_util_add_timezones_from_component (vcal, comp_data->icalcomp);
 		icalcomponent_add_component (vcal, icalcomponent_new_clone (comp_data->icalcomp));
 
-		comp_str = icalcomponent_as_ical_string (vcal);
+		comp_str = icalcomponent_as_ical_string_r (vcal);
 		if (comp_str) {
 			ESource *source = e_cal_get_source (comp_data->client);
 			const char *source_uid = e_source_peek_uid (source);
Index: calendar/gui/e-calendar-table.c
===================================================================
--- calendar/gui/e-calendar-table.c	(revision 36829)
+++ calendar/gui/e-calendar-table.c	(working copy)
@@ -1093,7 +1093,7 @@
 	e_cal_util_add_timezones_from_component (cal_table->tmp_vcal, comp_data->icalcomp);
 
 	/* add the new component to the VCALENDAR component */
-	comp_str = icalcomponent_as_ical_string (comp_data->icalcomp);
+	comp_str = icalcomponent_as_ical_string_r (comp_data->icalcomp);
 	child = icalparser_parse_string (comp_str);
 	if (child) {
 		icalcomponent_add_component (cal_table->tmp_vcal,
@@ -1123,7 +1123,7 @@
 
 	etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
 	e_table_selected_row_foreach (etable, copy_row_cb, cal_table);
-	comp_str = icalcomponent_as_ical_string (cal_table->tmp_vcal);
+	comp_str = icalcomponent_as_ical_string_r (cal_table->tmp_vcal);
 	clipboard = gtk_widget_get_clipboard (GTK_WIDGET (cal_table), clipboard_atom);
 	if (!gtk_clipboard_set_with_data(clipboard, target_types, n_target_types,
 					 clipboard_get_calendar_cb,
Index: calendar/gui/e-week-view.c
===================================================================
--- calendar/gui/e-week-view.c	(revision 36829)
+++ calendar/gui/e-week-view.c	(working copy)
@@ -349,7 +349,7 @@
 
 		prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY);
 		if (prop)
-			rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+			rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 	}
 
 	if (e_week_view_find_event_from_uid (week_view, comp_data->client, uid, rid, &event_num))
@@ -439,7 +439,7 @@
 
 			prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY);
 			if (prop)
-				rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+				rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 		}
 
 		if (e_week_view_find_event_from_uid (week_view, comp_data->client, uid, rid, &event_num))
@@ -2564,7 +2564,7 @@
 							span_num);
 			if (week_view->last_edited_comp_string == NULL)
 				continue;
-			current_comp_string = icalcomponent_as_ical_string (event->comp_data->icalcomp);
+			current_comp_string = icalcomponent_as_ical_string_r (event->comp_data->icalcomp);
 			if (strncmp (current_comp_string, week_view->last_edited_comp_string,50) == 0) {
 				EWeekViewEventSpan *span;
 				span = &g_array_index (week_view->spans, EWeekViewEventSpan, event->spans_index + span_num);
@@ -3714,7 +3714,7 @@
 		u = icalcomponent_get_uid (event->comp_data->icalcomp);
 		if (u && !strcmp (uid, u)) {
 			if (rid && *rid) {
-				r = icaltime_as_ical_string (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
+				r = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
 				if (!r || !*r)
 					continue;
 				if (strcmp (rid, r) != 0) {
Index: calendar/gui/e-calendar-view.c
===================================================================
--- calendar/gui/e-calendar-view.c	(revision 36829)
+++ calendar/gui/e-calendar-view.c	(working copy)
@@ -752,7 +752,7 @@
 	}
 
 	/* copy the VCALENDAR to the clipboard */
-	comp_str = icalcomponent_as_ical_string (vcal_comp);
+	comp_str = icalcomponent_as_ical_string_r (vcal_comp);
 	gtk_clipboard_set_text (gtk_widget_get_clipboard (GTK_WIDGET (cal_view), clipboard_atom),
 				(const gchar *) comp_str,
 				strlen (comp_str));
@@ -2399,7 +2399,7 @@
 	for (property = icalcomponent_get_first_property (icalcomp, ICAL_CATEGORIES_PROPERTY);
 	     property != NULL;
 	     property = icalcomponent_get_next_property (icalcomp, ICAL_CATEGORIES_PROPERTY)) {
-		char *value = icalproperty_get_value_as_string (property);
+		char *value = icalproperty_get_value_as_string_r (property);
 
 		if (value && strcmp (category, value) == 0){
 			g_free (value);
Index: calendar/gui/e-memo-table.c
===================================================================
--- calendar/gui/e-memo-table.c	(revision 36829)
+++ calendar/gui/e-memo-table.c	(working copy)
@@ -547,7 +547,7 @@
 	e_cal_util_add_timezones_from_component (memo_table->tmp_vcal, comp_data->icalcomp);
 
 	/* add the new component to the VCALENDAR component */
-	comp_str = icalcomponent_as_ical_string (comp_data->icalcomp);
+	comp_str = icalcomponent_as_ical_string_r (comp_data->icalcomp);
 	child = icalparser_parse_string (comp_str);
 	if (child) {
 		icalcomponent_add_component (memo_table->tmp_vcal,
@@ -597,7 +597,7 @@
 
 	etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (memo_table->etable));
 	e_table_selected_row_foreach (etable, copy_row_cb, memo_table);
-	comp_str = icalcomponent_as_ical_string (memo_table->tmp_vcal);
+	comp_str = icalcomponent_as_ical_string_r (memo_table->tmp_vcal);
 	clipboard = gtk_widget_get_clipboard (GTK_WIDGET (memo_table), clipboard_atom);
 	if (!gtk_clipboard_set_with_data(clipboard, target_types, n_target_types,
 					 clipboard_get_calendar_cb,
Index: calendar/gui/e-cal-model.c
===================================================================
--- calendar/gui/e-cal-model.c	(revision 36829)
+++ calendar/gui/e-cal-model.c	(working copy)
@@ -1317,7 +1317,7 @@
 			gboolean has_rid = (id->rid && *id->rid);
 
 			uid = icalcomponent_get_uid (comp_data->icalcomp);
-			rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+			rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 
 			if (uid && *uid) {
 				if ((!client || comp_data->client == client) && !strcmp (id->uid, uid)) {
