summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-13 08:09:53 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-13 08:33:13 (GMT)
commit5114fcb45d584ea50da7397088f084dfd74922b9 (patch)
tree18cb40f048186ebf0eac568e2ae53ec092044c55 /src/sql
parent55e47566dd1ac83ff674401dfd6284f07490cd8b (diff)
parentee62807198a2525577c14f718b98d07ae0ec7bec (diff)
downloadQt-5114fcb45d584ea50da7397088f084dfd74922b9.zip
Qt-5114fcb45d584ea50da7397088f084dfd74922b9.tar.gz
Qt-5114fcb45d584ea50da7397088f084dfd74922b9.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/tds/qsql_tds.h3
-rw-r--r--src/sql/drivers/tds/qsql_tds.pri4
-rw-r--r--src/sql/kernel/qsqldatabase.cpp3
3 files changed, 9 insertions, 1 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/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri
index c552ead..037f793 100644
--- a/src/sql/drivers/tds/qsql_tds.pri
+++ b/src/sql/drivers/tds/qsql_tds.pri
@@ -1,8 +1,10 @@
HEADERS += $$PWD/qsql_tds.h
SOURCES += $$PWD/qsql_tds.cpp
-unix {
+unix|win32-g++: {
+ !isEmpty(QT_LFLAGS_TDS):!static:LIBS *= $$QT_LFLAGS_TDS
!contains(LIBS, .*sybdb.*):LIBS += -lsybdb
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_TDS
} else:win32-borland {
LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
} else {
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 324a3ce..1cf5fde 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"