[libgda/LIBGDA_4.2] MDB provider: handle Mdbtools V0.7
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.2] MDB provider: handle Mdbtools V0.7
- Date: Wed, 25 Apr 2012 20:32:05 +0000 (UTC)
commit 60186377e6f10f9f8b4c4887de04552d41056804
Author: Vivien Malerba <malerba gnome-db org>
Date: Fri Mar 9 21:38:04 2012 +0100
MDB provider: handle Mdbtools V0.7
m4/mdbtools.m4 | 17 +++++++++++++++++
providers/mdb/gda-mdb-provider.c | 4 ++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/m4/mdbtools.m4 b/m4/mdbtools.m4
index fa771bc..448c550 100644
--- a/m4/mdbtools.m4
+++ b/m4/mdbtools.m4
@@ -51,6 +51,7 @@ dnl
dnl AM_CONDITIONAL(MDB, true)
dnl AC_DEFINE(MDB_WITH_WRITE_SUPPORT,[1],[define if mdb_open accepts MDB_WRITABLE])
dnl AC_DEFINE(MDB_BIND_COLUMN_FOUR_ARGS,[1],[define if mdb_bind_column accepts four args])
+dnl AC_DEFINE(MDB_V07,[1],[define if Mdbtools is in version 0.7])
dnl
dnl
dnl LICENSE
@@ -210,6 +211,22 @@ int main() {
if test "$mdb_bind_column_args" = "four"; then
AC_DEFINE(MDB_BIND_COLUMN_FOUR_ARGS,[1],[define if mdb_bind_column accepts four args])
fi
+
+ AC_MSG_CHECKING([whether Mdbtools is in version 0.7])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <mdbtools.h>
+int main() {
+ int a;
+ a = MDB_SDATETIME;
+ return 0;
+}
+]])],
+ mdb_v7=no, mdb_v7=yes)
+
+ AC_MSG_RESULT($mdb_v7)
+ if test "$mdb_v7" = "yes"; then
+ AC_DEFINE(MDB_V07,[1],[define if Mdbtools is in version 0.7])
+ fi
CFLAGS="$save_CFLAGS"
fi
fi
diff --git a/providers/mdb/gda-mdb-provider.c b/providers/mdb/gda-mdb-provider.c
index 336e9c0..36d5866 100644
--- a/providers/mdb/gda-mdb-provider.c
+++ b/providers/mdb/gda-mdb-provider.c
@@ -383,7 +383,11 @@ gda_mdb_type_to_gda (int col_type)
case MDB_NUMERIC : return GDA_TYPE_NUMERIC;
case MDB_OLE : return GDA_TYPE_BINARY;
case MDB_REPID : return GDA_TYPE_BINARY;
+#ifdef MDB_V07
+ case MDB_DATETIME : return GDA_TYPE_TIMESTAMP;
+#else
case MDB_SDATETIME : return GDA_TYPE_TIMESTAMP;
+#endif
case MDB_TEXT : return G_TYPE_STRING;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]