[evolution/gnome-2-28] Explicitly dllimport/export comp_editor_registry on Windows
- From: Tor Lillqvist <tml src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-28] Explicitly dllimport/export comp_editor_registry on Windows
- Date: Sat, 7 Nov 2009 19:18:16 +0000 (UTC)
commit 9b2dfe803246ebf0ebd1e5699b360384546036fa
Author: Tor Lillqvist <tml iki fi>
Date: Sat Nov 7 21:09:34 2009 +0200
Explicitly dllimport/export comp_editor_registry on Windows
Fixes build on Windows. Having variables in the API of a shared
library can be painful on Windows. The GNU tool-chain's ("MinGW")
auto-import feature usually works fine, but occasionally one needs to
explicitly decorate the variable definition with dllexport and extern
declarations with dllimport. I don't know why this is now necessary
for comp_editor_registry (it wasn't earlier). Something must have
changed slightly in the newer MinGW tool-chain versions.
calendar/gui/cal-editor-utils.c | 3 +++
calendar/gui/calendar-component.c | 3 +++
calendar/gui/comp-editor-factory.c | 3 +++
calendar/gui/e-calendar-table.c | 3 +++
calendar/gui/e-calendar-view.c | 3 +++
calendar/gui/e-memo-table.c | 3 +++
calendar/gui/main.c | 3 +++
calendar/gui/memos-component.c | 3 +++
calendar/gui/tasks-component.c | 3 +++
9 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/calendar/gui/cal-editor-utils.c b/calendar/gui/cal-editor-utils.c
index ece9abe..683cfff 100644
--- a/calendar/gui/cal-editor-utils.c
+++ b/calendar/gui/cal-editor-utils.c
@@ -31,6 +31,9 @@
#include "dialogs/task-editor.h"
#include "dialogs/memo-editor.h"
+#ifdef G_OS_WIN32
+__declspec(dllimport)
+#endif
extern ECompEditorRegistry *comp_editor_registry;
/**
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 625321a..ec35fa8 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -137,6 +137,9 @@ struct _CalendarComponentPrivate {
};
/* FIXME This should be gnome cal likely */
+#ifdef G_OS_WIN32
+__declspec(dllimport)
+#endif
extern ECompEditorRegistry *comp_editor_registry;
static void
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index ee80a00..0118085 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -40,6 +40,9 @@
#include "dialogs/event-editor.h"
#include "dialogs/task-editor.h"
+#ifdef G_OS_WIN32
+__declspec(dllimport)
+#endif
extern ECompEditorRegistry *comp_editor_registry;
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 3097dd3..ab04dbc 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -77,6 +77,9 @@ static GtkTargetEntry target_types[] = {
static guint n_target_types = G_N_ELEMENTS (target_types);
+#ifdef G_OS_WIN32
+__declspec(dllimport)
+#endif
extern ECompEditorRegistry *comp_editor_registry;
static void e_calendar_table_destroy (GtkObject *object);
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 286db6b..3507643 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -81,6 +81,9 @@ static void e_calendar_view_get_property (GObject *object, guint property_id, GV
static void e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
static void e_calendar_view_destroy (GtkObject *object);
+#ifdef G_OS_WIN32
+__declspec(dllimport)
+#endif
extern ECompEditorRegistry *comp_editor_registry;
/* Property IDs */
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 5015889..b843adc 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -71,6 +71,9 @@ static GtkTargetEntry target_types[] = {
static guint n_target_types = G_N_ELEMENTS (target_types);
+#ifdef G_OS_WIN32
+__declspec(dllimport)
+#endif
extern ECompEditorRegistry *comp_editor_registry;
static void e_memo_table_destroy (GtkObject *object);
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index 9d078ed..ffdebce 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -62,6 +62,9 @@
#define CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_ConfigControl:" BASE_VERSION
#define COMP_EDITOR_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_CompEditorFactory:" BASE_VERSION
+#ifdef G_OS_WIN32
+__declspec(dllexport)
+#endif
ECompEditorRegistry *comp_editor_registry = NULL;
/* The component editor factory */
diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c
index f4e3200..a427b22 100644
--- a/calendar/gui/memos-component.c
+++ b/calendar/gui/memos-component.c
@@ -77,6 +77,9 @@ static gint num_drag_types = sizeof(drag_types) / sizeof(drag_types[0]);
static BonoboObjectClass *parent_class = NULL;
/* Memos should have their own registry */
+#ifdef G_OS_WIN32
+__declspec(dllimport)
+#endif
extern ECompEditorRegistry *comp_editor_registry;
typedef struct _MemosComponentView
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index f793474..44d7379 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -76,6 +76,9 @@ static gint num_drag_types = sizeof(drag_types) / sizeof(drag_types[0]);
static BonoboObjectClass *parent_class = NULL;
/* Tasks should have their own registry */
+#ifdef G_OS_WIN32
+__declspec(dllimport)
+#endif
extern ECompEditorRegistry *comp_editor_registry;
typedef struct
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]