diff options
author | Mark Brand <mabrand@mabrand.nl> | 2010-07-29 09:15:00 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-07-29 09:15:00 (GMT) |
commit | 3643d21756a6bd9ed06a409457d6e8c93aba3b43 (patch) | |
tree | 5db858fa8e2465646101c4d5d99d5e34efabaf3b /src | |
parent | 9e846d7b36124087708f08a10bb677a878875f92 (diff) | |
download | Qt-3643d21756a6bd9ed06a409457d6e8c93aba3b43.zip Qt-3643d21756a6bd9ed06a409457d6e8c93aba3b43.tar.gz Qt-3643d21756a6bd9ed06a409457d6e8c93aba3b43.tar.bz2 |
fixes for using freetds
DBNTWIN32 only if not Q_USE_SYBASE.
Workaround for RETCODE typedef conflict between ODBC and FreeTDS.
Include winsock2.h supplies SOCKET for FreeTDS.
Merge-request: 684
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/sql/drivers/tds/qsql_tds.h | 3 | ||||
-rw-r--r-- | src/sql/kernel/qsqldatabase.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/sql/drivers/tds/qsql_tds.h b/src/sql/drivers/tds/qsql_tds.h index f23a672..3594a4d 100644 --- a/src/sql/drivers/tds/qsql_tds.h +++ b/src/sql/drivers/tds/qsql_tds.h @@ -48,7 +48,10 @@ #ifdef Q_OS_WIN32 #define WIN32_LEAN_AND_MEAN +#ifndef Q_USE_SYBASE #define DBNTWIN32 // indicates 32bit windows dblib +#endif +#include <winsock2.h> #include <QtCore/qt_windows.h> #include <sqlfront.h> #include <sqldb.h> diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index 76bc2b0..2ab37de 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -60,7 +60,10 @@ #include "../drivers/oci/qsql_oci.h" #endif #ifdef QT_SQL_TDS +// conflicting RETCODE typedef between odbc and freetds +#define RETCODE DBRETCODE #include "../drivers/tds/qsql_tds.h" +#undef RETCODE #endif #ifdef QT_SQL_DB2 #include "../drivers/db2/qsql_db2.h" |