[libgda] Fixed global symbol import in DLLs under Windows
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Fixed global symbol import in DLLs under Windows
- Date: Thu, 23 Dec 2010 19:30:06 +0000 (UTC)
commit e05bf7fab906e67d66edbdb2de36448dae9c355d
Author: Vivien Malerba <malerba gnome-db org>
Date: Thu Dec 23 20:28:02 2010 +0100
Fixed global symbol import in DLLs under Windows
installers/WindowsWix/make-zip-exe.sh | 2 +-
libgda/Makefile.am | 3 +-
libgda/libgda-global-variables.h | 39 +++++++++++++++++++++++++++
providers/mysql/gda-mysql-recordset.c | 3 +-
providers/postgres/gda-postgres-recordset.c | 4 +-
5 files changed, 45 insertions(+), 6 deletions(-)
---
diff --git a/installers/WindowsWix/make-zip-exe.sh b/installers/WindowsWix/make-zip-exe.sh
index 0ab73c1..05853a1 100755
--- a/installers/WindowsWix/make-zip-exe.sh
+++ b/installers/WindowsWix/make-zip-exe.sh
@@ -195,7 +195,7 @@ add_files_to_zip $archive_ext $cross_path lib/gtk-2.0/2.10.0/engines $files
#
# includes
#
-files=(gda-attributes-manager.h gda-batch.h gda-binreloc.h gda-blob-op.h gda-column.h gda-config.h gda-connection-event.h gda-connection.h gda-connection-private.h gda-data-access-wrapper.h gda-data-comparator.h gda-data-handler.h gda-data-model-array.h gda-data-model-bdb.h gda-data-model-dir.h gda-data-model-extra.h gda-data-model.h gda-data-model-import.h gda-data-model-iter-extra.h gda-data-model-iter.h gda-data-model-private.h gda-data-proxy.h gda-data-select.h gda-debug-macros.h gda-decl.h gda-easy.h gda-enums.h gda-enum-types.h gda-holder.h gda-lockable.h gda-log.h gda-marshal.h gda-meta-store.h gda-meta-struct.h gda-mutex.h gda-quark-list.h gda-row.h gda-server-operation.h gda-server-provider-extra.h gda-server-provider.h gda-server-provider-private.h gda-set.h gda-statement-extra.h gda-statement.h gda-transaction-status.h gda-transaction-status-private.h gda-util.h gda-value.h gda-xa-transaction.h libgda.h gda-repetitive-statement.h gda-sql-builder.h gda-tree.h gda-t
ree-manager.h gda-tree-mgr-columns.h gda-tree-mgr-label.h gda-tree-mgr-schemas.h gda-tree-mgr-select.h gda-tree-mgr-tables.h gda-tree-node.h)
+files=(gda-attributes-manager.h gda-batch.h gda-binreloc.h gda-blob-op.h gda-column.h gda-config.h gda-connection-event.h gda-connection.h gda-connection-private.h gda-data-access-wrapper.h gda-data-comparator.h gda-data-handler.h gda-data-model-array.h gda-data-model-bdb.h gda-data-model-dir.h gda-data-model-extra.h gda-data-model.h gda-data-model-import.h gda-data-model-iter-extra.h gda-data-model-iter.h gda-data-model-private.h gda-data-proxy.h gda-data-select.h gda-debug-macros.h gda-decl.h gda-easy.h gda-enums.h gda-enum-types.h gda-holder.h gda-lockable.h gda-log.h gda-marshal.h gda-meta-store.h gda-meta-struct.h gda-mutex.h gda-quark-list.h gda-row.h gda-server-operation.h gda-server-provider-extra.h gda-server-provider.h gda-server-provider-private.h gda-set.h gda-statement-extra.h gda-statement.h gda-transaction-status.h gda-transaction-status-private.h gda-util.h gda-value.h gda-xa-transaction.h libgda.h libgda-global-variables.h gda-repetitive-statement.h gda-sql-
builder.h gda-tree.h gda-tree-manager.h gda-tree-mgr-columns.h gda-tree-mgr-label.h gda-tree-mgr-schemas.h gda-tree-mgr-select.h gda-tree-mgr-tables.h gda-tree-node.h)
add_files_to_zip $archive_dev $prefix include/libgda-4.0/libgda $files
files=(gda-sqlite-provider.h)
diff --git a/libgda/Makefile.am b/libgda/Makefile.am
index 6327c1b..03570af 100644
--- a/libgda/Makefile.am
+++ b/libgda/Makefile.am
@@ -94,7 +94,8 @@ gda_headers = \
gda-tree-mgr-select.h \
gda-util.h \
gda-value.h \
- gda-xa-transaction.h
+ gda-xa-transaction.h \
+ libgda-global-variables.h
gda_built_sources= \
$(builddir)/libgda.h
diff --git a/libgda/libgda-global-variables.h b/libgda/libgda-global-variables.h
new file mode 100644
index 0000000..13f01aa
--- /dev/null
+++ b/libgda/libgda-global-variables.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 The GNOME Foundation.
+ *
+ * AUTHORS:
+ * Vivien Malerba <malerba gnome-db org>
+ *
+ * This Library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This Library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __LIBGDA_GLOBAL_VARIABLES_H__
+#define __LIBGDA_GLOBAL_VARIABLES_H__
+
+#include <libgda/gda-attributes-manager.h>
+
+#ifdef G_OS_WIN32
+#define IMPORT __declspec(dllimport)
+#else
+#define IMPORT
+#endif
+
+IMPORT extern gchar *gda_numeric_locale;
+IMPORT extern gchar *gda_lang_locale;
+IMPORT extern xmlDtdPtr gda_paramlist_dtd;
+IMPORT extern GdaAttributesManager *gda_holder_attributes_manager;
+
+#endif
diff --git a/providers/mysql/gda-mysql-recordset.c b/providers/mysql/gda-mysql-recordset.c
index d03a77c..f95194a 100644
--- a/providers/mysql/gda-mysql-recordset.c
+++ b/providers/mysql/gda-mysql-recordset.c
@@ -31,11 +31,10 @@
#include "gda-mysql-recordset.h"
#include "gda-mysql-provider.h"
#include "gda-mysql-util.h"
-
+#include <libgda/libgda-global-variables.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
-extern gchar *gda_numeric_locale;
#define _GDA_PSTMT(x) ((GdaPStmt*)(x))
diff --git a/providers/postgres/gda-postgres-recordset.c b/providers/postgres/gda-postgres-recordset.c
index 840968e..cc7d41e 100644
--- a/providers/postgres/gda-postgres-recordset.c
+++ b/providers/postgres/gda-postgres-recordset.c
@@ -1,5 +1,5 @@
/* GDA Postgres provider
- * Copyright (C) 2008 2010 The GNOME Foundation.
+ * Copyright (C) 2008 - 2010 The GNOME Foundation.
*
* AUTHORS:
* Vivien Malerba <malerba gnome-db org>
@@ -30,10 +30,10 @@
#include "gda-postgres-provider.h"
#include "gda-postgres-blob-op.h"
#include "gda-postgres-util.h"
+#include <libgda/libgda-global-variables.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
-extern gchar *gda_numeric_locale;
#define _GDA_PSTMT(x) ((GdaPStmt*)(x))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]