[libgda/LIBGDA_4.0] Fixed global symbol import in DLLs under Windows



commit 2818ab68ea7f256d41418471dbe4450ae517e603
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun Jan 9 20:29:34 2011 +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 90e0aa3..ed0513b 100755
--- a/installers/WindowsWix/make-zip-exe.sh
+++ b/installers/WindowsWix/make-zip-exe.sh
@@ -107,7 +107,7 @@ add_files_to_zip $archive $prefix lib/libgda-4.0/providers $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-error.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)
+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-error.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)
 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 9a16c62..b5648f5 100644
--- a/libgda/Makefile.am
+++ b/libgda/Makefile.am
@@ -82,7 +82,8 @@ gda_headers = \
 	gda-util.h \
 	gda-value.h \
 	gda-xa-transaction.h \
-	libgda.h 
+	libgda.h \
+	libgda-global-variables.h
 
 gda_sources= \
 	gda-batch.c \
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 30ae126..3566a4a 100644
--- a/providers/mysql/gda-mysql-recordset.c
+++ b/providers/mysql/gda-mysql-recordset.c
@@ -30,11 +30,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 90461ad..54790da 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]