summaryrefslogtreecommitdiff
path: root/qmake/tools/qgvector.cpp
Side-by-side diff
Diffstat (limited to 'qmake/tools/qgvector.cpp') (more/less context) (show whitespace changes)
-rw-r--r--qmake/tools/qgvector.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/qmake/tools/qgvector.cpp b/qmake/tools/qgvector.cpp
index 1985f03..3c903ed 100644
--- a/qmake/tools/qgvector.cpp
+++ b/qmake/tools/qgvector.cpp
@@ -30,16 +30,22 @@
** See http://www.trolltech.com/qpl/ for QPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
+#include "qglobal.h"
+#if defined(Q_CC_BOR)
+// needed for qsort() because of a std namespace problem on Borland
+#include "qplatformdefs.h"
+#endif
+
#define QGVECTOR_CPP
#include "qgvector.h"
#include "qglist.h"
#include "qstring.h"
#include "qdatastream.h"
#include <stdlib.h>
#ifdef QT_THREAD_SUPPORT
@@ -388,17 +394,18 @@ void QGVector::sort() // sort vector
*start = *end;
*end = tmp;
} else {
break;
}
}
#ifdef QT_THREAD_SUPPORT
- QMutexLocker locker( qt_global_mutexpool->get( &sort_vec ) );
+ QMutexLocker locker( qt_global_mutexpool ?
+ qt_global_mutexpool->get( &sort_vec ) : 0 );
#endif // QT_THREAD_SUPPORT
sort_vec = (QGVector*)this;
qsort( vec, count(), sizeof(Item), cmp_vec );
sort_vec = 0;
}
int QGVector::bsearch( Item d ) const // binary search; when sorted