diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2013-01-28 13:42:14 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2013-01-28 13:42:14 +0400 |
commit | 4f9e09efb4c7d90fc8d659a4cd9fea2d05b2af8e (patch) | |
tree | b183f22e704bef301803fc365b4a7752c789ed30 /storage/connect/value.cpp | |
parent | 6690bafca90ecd160034f7315d900f7c3f84e622 (diff) | |
download | mariadb-git-4f9e09efb4c7d90fc8d659a4cd9fea2d05b2af8e.tar.gz |
Fixing ODBC related compilation failures:
- without ODBC: adding a few "#ifdef CONNECT_SUPPORT"
- with ODBC on Linux: conflicting definitions for DWORD
in sql.h (unixODBC) vs global.h.
Using "typedef unsigned int DWORD", as this is how MS SQK defines it
and matches unixODBC definition.
Removing sqlutil.h. value.cpp now uses sql.h and sqlext.h instead.
removed:
storage/connect/sqlutil.h
modified:
storage/connect/global.h
storage/connect/value.cpp
storage/connect/value.h
Diffstat (limited to 'storage/connect/value.cpp')
-rw-r--r-- | storage/connect/value.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index 5f892d9fc9b..3eea691f659 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -32,15 +32,17 @@ #include "my_global.h"
#if defined(WIN32)
//#include <windows.h>
-#include <sql.h>
-#include <sqlext.h>
#else // !WIN32
#include <string.h>
-#include "sqlutil.h"
#endif // !WIN32
#include <math.h>
+#ifdef ODBC_SUPPORT
+#include <sql.h>
+#include <sqlext.h>
+#endif
+
#undef DOMAIN // Was defined in math.h
/***********************************************************************/
@@ -198,6 +200,7 @@ int GetDBType(int type) return tp;
} // end of GetPLGType
+#if ODBC_SUPPORT
/***********************************************************************/
/* GetSQLType: returns the SQL_TYPE corresponding to a PLG type. */
/***********************************************************************/
@@ -235,6 +238,8 @@ int GetSQLCType(int type) return tp;
} // end of GetSQLCType
+#endif /* ODBC_SUPPORT */
+
/***********************************************************************/
/* GetFormatType: returns the FORMAT character(s) according to type. */
@@ -274,6 +279,7 @@ int GetFormatType(char c) return type;
} // end of GetFormatType
+#ifdef ODBC_SUPPORT
/***********************************************************************/
/* TranslateSQLType: translate a SQL Type to a PLG type. */
/***********************************************************************/
@@ -338,6 +344,7 @@ int TranslateSQLType(int stp, int prec, int& len) return type;
} // end of TranslateSQLType
+#endif ODBC_SUPPORT
/***********************************************************************/
/* IsTypeChar: returns true for character type(s). */
|