diff -ur original/qt-3.3.x-p8/mkspecs/win32-g++/qmake.conf qt-3.3.x-p8/mkspecs/win32-g++/qmake.conf
--- original/qt-3.3.x-p8/mkspecs/win32-g++/qmake.conf	2007-05-07 04:42:28.000000000 -0400
+++ qt-3.3.x-p8/mkspecs/win32-g++/qmake.conf	2007-12-01 13:22:36.991000000 -0500
@@ -57,7 +57,8 @@
 QMAKE_RUN_CXX_IMP	= $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
 
 QMAKE_LINK		= g++
-QMAKE_LFLAGS		= -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
+QMAKE_LFLAGS		= -Wl,-enable-auto-import
+	#-Wl,-enable-stdcall-fixup -Wl,-enable-runtime-pseudo-reloc
 QMAKE_LFLAGS_RELEASE	= -Wl,-s
 QMAKE_LFLAGS_DEBUG	=
 QMAKE_LFLAGS_THREAD	= -mthreads
@@ -71,7 +72,7 @@
 
 QMAKE_LIBS		=
 QMAKE_LIBS_CONSOLE	=
-QMAKE_LIBS_WINDOWS	= -lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -limm32 -lwinmm -lwsock32 -lwinspool
+QMAKE_LIBS_WINDOWS	= -lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -limm32 -lwinmm -lws2_32 -lwinspool
 QMAKE_LIBS_QT		= -lqt
 QMAKE_LIBS_QT_THREAD	= -lqt-mt
 QMAKE_LIBS_QT_ENTRY	= -lqtmain
@@ -87,12 +88,16 @@
 QMAKE_RC		= windres
 
 QMAKE_ZIP		= zip -r -9
+QMAKE_TAR		= tar -cf
+QMAKE_GZIP		= gzip -9f
 
-QMAKE_COPY		= copy
-QMAKE_MOVE		= move
-QMAKE_DEL_FILE		= del
+QMAKE_COPY		= cp -f
+QMAKE_COPY_FILE         = $(COPY)
+QMAKE_COPY_DIR          = $(COPY) -r
+QMAKE_MOVE		= mv -f
+QMAKE_DEL_FILE		= rm -f
 QMAKE_DEL_DIR		= rmdir
-QMAKE_STRIP		= strip
+QMAKE_STRIP             = strip
 QMAKE_STRIPFLAGS_LIB 	+= --strip-unneeded
-QMAKE_CHK_DIR_EXISTS	= if not exist
-QMAKE_MKDIR		= mkdir
+QMAKE_CHK_DIR_EXISTS	= test -d
+QMAKE_MKDIR		= mkdir -p
diff -ur original/qt-3.3.x-p8/plugins/src/sqldrivers/mysql/mysql.pro qt-3.3.x-p8/plugins/src/sqldrivers/mysql/mysql.pro
--- original/qt-3.3.x-p8/plugins/src/sqldrivers/mysql/mysql.pro	2007-05-07 04:41:21.000000000 -0400
+++ qt-3.3.x-p8/plugins/src/sqldrivers/mysql/mysql.pro	2007-10-02 16:12:31.000000000 -0400
@@ -17,7 +17,7 @@
 }
 win32 {
 	OBJECTS_DIR = obj
-	LIBS	*= libmysql.lib
+	LIBS	*= -lmysql
 #	win32-msvc: {
 #		LIBS *= delayimp.lib
 #		QMAKE_LFLAGS += /DELAYLOAD:libmysql.dll
diff -ur original/qt-3.3.x-p8/qmake/generators/makefile.cpp qt-3.3.x-p8/qmake/generators/makefile.cpp
--- original/qt-3.3.x-p8/qmake/generators/makefile.cpp	2007-05-07 04:36:02.000000000 -0400
+++ qt-3.3.x-p8/qmake/generators/makefile.cpp	2007-09-27 16:10:51.000000000 -0400
@@ -63,7 +63,7 @@
 {
     QString ret =  "@$(CHK_DIR_EXISTS) \"" + dir + "\" ";
     if(Option::target_mode == Option::TARG_WIN_MODE)
-	ret += "$(MKDIR)";
+	ret += "|| $(MKDIR)";
     else
 	ret += "|| $(MKDIR)";
     ret += " \"" + dir + "\"";
diff -ur original/qt-3.3.x-p8/qmake/generators/win32/mingw_make.cpp qt-3.3.x-p8/qmake/generators/win32/mingw_make.cpp
--- original/qt-3.3.x-p8/qmake/generators/win32/mingw_make.cpp	2007-05-07 04:36:01.000000000 -0400
+++ qt-3.3.x-p8/qmake/generators/win32/mingw_make.cpp	2007-09-29 12:34:05.000000000 -0400
@@ -550,6 +550,8 @@
 	} else {
 	    project->variables()["TARGET_EXT"].append(".dll");
 	}
+    if(project->variables()["TARGET"].first().left(3) != "lib")
+    project->variables()["TARGET"].first().prepend("lib");
     } else {
 	project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CFLAGS_CONSOLE"];
 	project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CXXFLAGS_CONSOLE"];
@@ -622,13 +624,13 @@
 	    (*inner) = Option::fixPathToTargetOS((*inner), FALSE);
     }
 
-    if ( project->isActiveConfig("dll") ) {
-		QString destDir = "";
-		if (!project->first("DESTDIR").isEmpty())
-			destDir = project->first("DESTDIR") + Option::dir_sep;
-		project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,--out-implib,") +
-					  destDir + "lib" + project->first("TARGET") + ".a");
-    }
+  //  if ( project->isActiveConfig("dll") ) {
+		//QString destDir = "";
+		//if (!project->first("DESTDIR").isEmpty())
+		//	destDir = project->first("DESTDIR") + Option::dir_sep;
+		//project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,--out-implib,") +
+		//			  destDir + project->first("TARGET") + ".a");
+  //  }
 
     if ( !project->variables()["DEF_FILE"].isEmpty() )
 	project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,") + project->first("DEF_FILE"));
@@ -670,7 +672,7 @@
     }
 
     if(project->isActiveConfig("dll")) {
-	project->variables()["QMAKE_CLEAN"].append(project->first("DESTDIR") +"lib" + project->first("TARGET") + ".a");
+	project->variables()["QMAKE_CLEAN"].append(project->first("DESTDIR") + project->first("TARGET") + ".a");
     }
 
     QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
@@ -712,3 +714,159 @@
     }
     t << qs ;
 }
+
+QString
+MingwMakefileGenerator::defaultInstall(const QString &t)
+{
+    if(t != "target" || project->first("TEMPLATE") == "subdirs")
+	return QString();
+
+    bool resource = FALSE;
+    const QString root = "$(INSTALL_ROOT)";
+    QStringList &uninst = project->variables()[t + ".uninstall"];
+    QString ret, destdir=project->first("DESTDIR");
+    QString targetdir = Option::fixPathToTargetOS(project->first("target.path"), FALSE);
+    if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
+	destdir += Option::dir_sep;
+    targetdir = fileFixify(targetdir);
+    if(targetdir.right(1) != Option::dir_sep)
+	targetdir += Option::dir_sep;
+
+    QStringList links;
+    QString target="$(TARGET)";
+    if(project->first("TEMPLATE") == "app" && project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) {
+	    destdir += "../../../";
+	    target += ".app";
+	    resource = TRUE;
+    } else if(project->first("TEMPLATE") == "lib") {
+	if(project->isActiveConfig("create_prl") && !project->isActiveConfig("no_install_prl") &&
+	   !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) {
+	    QString dst_prl = project->first("QMAKE_INTERNAL_PRL_FILE");
+	    int slsh = dst_prl.findRev('/');
+	    if(slsh != -1)
+		dst_prl = dst_prl.right(dst_prl.length() - slsh - 1);
+	    dst_prl = root + targetdir + dst_prl;
+	    ret += "-$(INSTALL_FILE) \"" + project->first("QMAKE_INTERNAL_PRL_FILE") + "\" \"" + dst_prl + "\"";
+	    if(!uninst.isEmpty())
+		uninst.append("\n\t");
+	    uninst.append("-$(DEL_FILE) \"" + dst_prl + "\"");
+	}
+	if(project->isActiveConfig("create_libtool") && !project->isActiveConfig("compile_libtool")) {
+	    QString src_lt = var("QMAKE_ORIG_TARGET");
+	    int slsh = src_lt.findRev(Option::dir_sep);
+	    if(slsh != -1)
+		src_lt = src_lt.right(src_lt.length() - slsh);
+	    int dot = src_lt.find('.');
+	    if(dot != -1)
+		src_lt = src_lt.left(dot);
+	    src_lt += Option::libtool_ext;
+	    src_lt.prepend("lib");
+	    QString dst_lt = root + targetdir + src_lt;
+	    if(!project->isEmpty("DESTDIR")) {
+		src_lt.prepend(var("DESTDIR"));
+		src_lt = Option::fixPathToLocalOS(fileFixify(src_lt,
+							     QDir::currentDirPath(), Option::output_dir));
+	    }
+	    if(!ret.isEmpty())
+		ret += "\n\t";
+	    ret += "-$(INSTALL_FILE) \"" + src_lt + "\" \"" + dst_lt + "\"";
+	    if(!uninst.isEmpty())
+		uninst.append("\n\t");
+	    uninst.append("-$(DEL_FILE) \"" + dst_lt + "\"");
+	}
+	if(project->isActiveConfig("create_pc")) {
+	    QString src_pc = var("QMAKE_ORIG_TARGET");
+	    int slsh = src_pc.findRev(Option::dir_sep);
+	    if(slsh != -1)
+		src_pc = src_pc.right(src_pc.length() - slsh);
+	    int dot = src_pc.find('.');
+	    if(dot != -1)
+		src_pc = src_pc.left(dot);
+	    src_pc += ".pc";
+	    QString d = root + targetdir + "pkgconfig" + Option::dir_sep;
+	    QString dst_pc = d + src_pc;
+	    if(!project->isEmpty("DESTDIR")) {
+		src_pc.prepend(var("DESTDIR"));
+		src_pc = Option::fixPathToLocalOS(fileFixify(src_pc,
+							     QDir::currentDirPath(), Option::output_dir));
+	    }
+	    if(!ret.isEmpty())
+		ret += "\n\t";
+	    ret += mkdir_p_asstring(d) + "\n\t";
+	    ret += "-$(INSTALL_FILE) \"" + src_pc + "\" \"" + dst_pc + "\"";
+	    if(!uninst.isEmpty())
+		uninst.append("\n\t");
+	    uninst.append("-$(DEL_FILE) \"" + dst_pc + "\"");
+	}
+	if ( project->isEmpty("QMAKE_CYGWIN_SHLIB") ) {
+	    if ( !project->isActiveConfig("staticlib") && !project->isActiveConfig("plugin") ) {
+		if ( project->isEmpty("QMAKE_HPUX_SHLIB") ) {
+		    links << "$(TARGET0)" << "$(TARGET1)" << "$(TARGET2)";
+		} else {
+		    links << "$(TARGET0)";
+	        }
+	    }
+	}
+    }
+
+    if(!resource && project->isActiveConfig("compile_libtool")) {
+	QString src_targ = target;
+	if(src_targ == "$(TARGET)")
+	    src_targ = "$(TARGETL)";
+	QString dst_dir = fileFixify(targetdir);
+	if(QDir::isRelativePath(dst_dir))
+	    dst_dir = Option::fixPathToTargetOS(Option::output_dir + Option::dir_sep + dst_dir);
+	ret = "-$(LIBTOOL) --mode=install cp \"" + src_targ + "\" \"" + root + dst_dir + "\"";
+	uninst.append("-$(LIBTOOL) --mode=uninstall \"" + src_targ + "\"");
+    } else {
+	QString src_targ = target;
+	if(!destdir.isEmpty())
+	    src_targ = Option::fixPathToTargetOS(destdir + target, FALSE);
+	QString dst_targ = root + targetdir + target;
+	if(!ret.isEmpty())
+	    ret += "\n\t";
+	if(resource)
+	    ret += "$(DEL_FILE) -r \"" + dst_targ + "\"" + "\n\t";
+	if(!ret.isEmpty())
+	    ret += "\n\t";
+	ret += QString(resource ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" +
+	       src_targ + "\" \"" + dst_targ + "\"";
+	if(!project->isActiveConfig("debug") && !project->isEmpty("QMAKE_STRIP") &&
+	   (project->first("TEMPLATE") != "lib" || !project->isActiveConfig("staticlib"))) {
+	    ret += "\n\t-" + var("QMAKE_STRIP");
+	    if(project->first("TEMPLATE") == "lib" && !project->isEmpty("QMAKE_STRIPFLAGS_LIB"))
+		ret += " " + var("QMAKE_STRIPFLAGS_LIB");
+	    else if(project->first("TEMPLATE") == "app" && !project->isEmpty("QMAKE_STRIPFLAGS_APP"))
+		ret += " " + var("QMAKE_STRIPFLAGS_APP");
+	    if(resource)
+		ret = " \"" + dst_targ + "/Contents/MacOS/$(QMAKE_TARGET)\"";
+	    else
+		ret += " \"" + dst_targ + "\"";
+	}
+	if(!uninst.isEmpty())
+	    uninst.append("\n\t");
+	if(resource)
+	    uninst.append("-$(DEL_FILE) -r \"" + dst_targ + "\"");
+	else
+	    uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
+	if(!links.isEmpty()) {
+	    for(QStringList::Iterator it = links.begin(); it != links.end(); it++) {
+		if(Option::target_mode == Option::TARG_WIN_MODE ||
+		   Option::target_mode == Option::TARG_MAC9_MODE) {
+		} else if(Option::target_mode == Option::TARG_UNIX_MODE ||
+			  Option::target_mode == Option::TARG_MACX_MODE) {
+		    QString link = Option::fixPathToTargetOS(destdir + (*it), FALSE);
+		    int lslash = link.findRev(Option::dir_sep);
+		    if(lslash != -1)
+			link = link.right(link.length() - (lslash + 1));
+		    QString dst_link = root + targetdir + link;
+		    ret += "\n\t-$(SYMLINK) \"$(TARGET)\" \"" + dst_link + "\"";
+		    if(!uninst.isEmpty())
+			uninst.append("\n\t");
+		    uninst.append("-$(DEL_FILE) \"" + dst_link + "\"");
+		}
+	    }
+	}
+    }
+    return ret;
+}
diff -ur original/qt-3.3.x-p8/qmake/generators/win32/mingw_make.h qt-3.3.x-p8/qmake/generators/win32/mingw_make.h
--- original/qt-3.3.x-p8/qmake/generators/win32/mingw_make.h	2007-05-07 04:36:01.000000000 -0400
+++ qt-3.3.x-p8/qmake/generators/win32/mingw_make.h	2007-09-27 15:49:29.000000000 -0400
@@ -53,6 +53,8 @@
     MingwMakefileGenerator(QMakeProject *p);
     ~MingwMakefileGenerator();
 
+protected:
+    virtual QString defaultInstall(const QString &);
 };
 
 inline MingwMakefileGenerator::~MingwMakefileGenerator()
diff -ur original/qt-3.3.x-p8/qmake/option.cpp qt-3.3.x-p8/qmake/option.cpp
--- original/qt-3.3.x-p8/qmake/option.cpp	2007-05-07 04:36:03.000000000 -0400
+++ qt-3.3.x-p8/qmake/option.cpp	2007-09-26 14:08:34.000000000 -0400
@@ -393,7 +393,7 @@
 
     //defaults for globals
     if(Option::target_mode == Option::TARG_WIN_MODE) {
-	Option::dir_sep = "\\";
+	Option::dir_sep = "/";
 	Option::obj_ext =  ".obj";
     } else {
 	if(Option::target_mode == Option::TARG_MAC9_MODE)
diff -ur original/qt-3.3.x-p8/qmake/project.cpp qt-3.3.x-p8/qmake/project.cpp
--- original/qt-3.3.x-p8/qmake/project.cpp	2007-05-07 04:36:03.000000000 -0400
+++ qt-3.3.x-p8/qmake/project.cpp	2007-09-27 15:40:58.000000000 -0400
@@ -663,14 +663,8 @@
 	templ.first().prepend(Option::user_template_prefix);
 
     if(vars["TARGET"].isEmpty()) {
-	// ### why not simply use:
-	// QFileInfo fi(pfile);
-	// fi.baseName();
-	QString tmp = pfile;
-	if(tmp.findRev('/') != -1)
-	    tmp = tmp.right( tmp.length() - tmp.findRev('/') - 1 );
-	if(tmp.findRev('.') != -1)
-	    tmp = tmp.left(tmp.findRev('.'));
+	QFileInfo fi(pfile);
+	QString tmp = fi.baseName();
 	vars["TARGET"].append(tmp);
     }
 
diff -ur original/qt-3.3.x-p8/qmake/qmake.pro qt-3.3.x-p8/qmake/qmake.pro
--- original/qt-3.3.x-p8/qmake/qmake.pro	2007-05-07 04:36:03.000000000 -0400
+++ qt-3.3.x-p8/qmake/qmake.pro	2007-09-27 09:34:38.000000000 -0400
@@ -7,6 +7,10 @@
 OBJECTS_DIR = tmp
 QMAKE_CLEAN += ..\bin\qmake.exe
 
+CONFIG -= win32
+CONFIG -= win32-g++
+CONFIG += unix
+
 win32-msvc {
 	LIBS += ole32.lib uuid.lib advapi32.lib
 	QMAKE_CLEAN += vc60.pdb qmake.pdb qmake.ilk ..\bin\qmake.exe
diff -ur original/qt-3.3.x-p8/src/kernel/qcolor.h qt-3.3.x-p8/src/kernel/qcolor.h
--- original/qt-3.3.x-p8/src/kernel/qcolor.h	2007-05-07 04:34:47.000000000 -0400
+++ qt-3.3.x-p8/src/kernel/qcolor.h	2007-10-04 21:58:46.736000000 -0400
@@ -45,28 +45,28 @@
 
 const QRgb  RGB_MASK    = 0x00ffffff;		// masks RGB values
 
-Q_EXPORT inline int qRed( QRgb rgb )		// get red part of RGB
+/*Q_EXPORT*/ inline int qRed( QRgb rgb )		// get red part of RGB
 { return (int)((rgb >> 16) & 0xff); }
 
-Q_EXPORT inline int qGreen( QRgb rgb )		// get green part of RGB
+/*Q_EXPORT*/ inline int qGreen( QRgb rgb )		// get green part of RGB
 { return (int)((rgb >> 8) & 0xff); }
 
-Q_EXPORT inline int qBlue( QRgb rgb )		// get blue part of RGB
+/*Q_EXPORT*/ inline int qBlue( QRgb rgb )		// get blue part of RGB
 { return (int)(rgb & 0xff); }
 
-Q_EXPORT inline int qAlpha( QRgb rgb )		// get alpha part of RGBA
+/*Q_EXPORT*/ inline int qAlpha( QRgb rgb )		// get alpha part of RGBA
 { return (int)((rgb >> 24) & 0xff); }
 
-Q_EXPORT inline QRgb qRgb( int r, int g, int b )// set RGB value
+/*Q_EXPORT*/ inline QRgb qRgb( int r, int g, int b )// set RGB value
 { return (0xff << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
 
-Q_EXPORT inline QRgb qRgba( int r, int g, int b, int a )// set RGBA value
+/*Q_EXPORT*/ inline QRgb qRgba( int r, int g, int b, int a )// set RGBA value
 { return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
 
-Q_EXPORT inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255
+/*Q_EXPORT*/ inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255
 { return (r*11+g*16+b*5)/32; }
 
-Q_EXPORT inline int qGray( QRgb rgb )		// convert RGB to gray 0..255
+/*Q_EXPORT*/ inline int qGray( QRgb rgb )		// convert RGB to gray 0..255
 { return qGray( qRed(rgb), qGreen(rgb), qBlue(rgb) ); }
 
 
diff -ur original/qt-3.3.x-p8/src/kernel/qpaintdevice.h qt-3.3.x-p8/src/kernel/qpaintdevice.h
--- original/qt-3.3.x-p8/src/kernel/qpaintdevice.h	2007-05-07 04:34:46.000000000 -0400
+++ qt-3.3.x-p8/src/kernel/qpaintdevice.h	2007-10-04 22:01:10.504000000 -0400
@@ -403,7 +403,7 @@
 #endif // Q_WS_X11
 
 
-Q_EXPORT
+/*Q_EXPORT*/
 inline void bitBlt( QPaintDevice *dst, const QPoint &dp,
 		    const QPaintDevice *src, const QRect &sr =QRect(0,0,-1,-1),
 		    Qt::RasterOp rop=Qt::CopyROP, bool ignoreMask=FALSE )
diff -ur original/qt-3.3.x-p8/src/sql/qt_sql.pri qt-3.3.x-p8/src/sql/qt_sql.pri
--- original/qt-3.3.x-p8/src/sql/qt_sql.pri	2007-05-07 04:35:13.000000000 -0400
+++ qt-3.3.x-p8/src/sql/qt_sql.pri	2007-09-13 14:24:00.000000000 -0400
@@ -91,7 +91,7 @@
 		}
 		win32 {
 			!contains( LIBS, .*mysql.* ) {
-				LIBS    *= libmysql.lib
+				LIBS    *= -lmysql
 			}
 #			win32-msvc: { 
 #				LIBS *= delayimp.lib
diff -ur original/qt-3.3.x-p8/src/tools/qcstring.h qt-3.3.x-p8/src/tools/qcstring.h
--- original/qt-3.3.x-p8/src/tools/qcstring.h	2007-05-07 04:35:24.000000000 -0400
+++ qt-3.3.x-p8/src/tools/qcstring.h	2007-10-04 21:59:37.874000000 -0400
@@ -54,21 +54,21 @@
 
 Q_EXPORT char *qstrdup( const char * );
 
-Q_EXPORT inline uint qstrlen( const char *str )
+/*Q_EXPORT*/ inline uint qstrlen( const char *str )
 { return str ? (uint)strlen(str) : 0u; }
 
-Q_EXPORT inline char *qstrcpy( char *dst, const char *src )
+/*Q_EXPORT*/ inline char *qstrcpy( char *dst, const char *src )
 { return src ? strcpy(dst, src) : 0; }
 
 Q_EXPORT char *qstrncpy( char *dst, const char *src, uint len );
 
-Q_EXPORT inline int qstrcmp( const char *str1, const char *str2 )
+/*Q_EXPORT*/ inline int qstrcmp( const char *str1, const char *str2 )
 {
     return ( str1 && str2 ) ? strcmp( str1, str2 )
 			    : ( str1 ? 1 : ( str2 ? -1 : 0 ) );
 }
 
-Q_EXPORT inline int qstrncmp( const char *str1, const char *str2, uint len )
+/*Q_EXPORT*/ inline int qstrncmp( const char *str1, const char *str2, uint len )
 {
     return ( str1 && str2 ) ? strncmp( str1, str2, len )
 			    : ( str1 ? 1 : ( str2 ? -1 : 0 ) );
@@ -79,16 +79,16 @@
 Q_EXPORT int qstrnicmp( const char *, const char *, uint len );
 
 #ifndef QT_CLEAN_NAMESPACE
-Q_EXPORT inline uint cstrlen( const char *str )
+/*Q_EXPORT*/ inline uint cstrlen( const char *str )
 { return (uint)strlen(str); }
 
-Q_EXPORT inline char *cstrcpy( char *dst, const char *src )
+/*Q_EXPORT*/ inline char *cstrcpy( char *dst, const char *src )
 { return strcpy(dst,src); }
 
-Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 )
+/*Q_EXPORT*/ inline int cstrcmp( const char *str1, const char *str2 )
 { return strcmp(str1,str2); }
 
-Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len )
+/*Q_EXPORT*/ inline int cstrncmp( const char *str1, const char *str2, uint len )
 { return strncmp(str1,str2,len); }
 #endif
 
@@ -119,9 +119,9 @@
 #ifndef QT_NO_COMPRESS
 Q_EXPORT QByteArray qCompress( const uchar* data, int nbytes );
 Q_EXPORT QByteArray qUncompress( const uchar* data, int nbytes );
-Q_EXPORT inline QByteArray qCompress( const QByteArray& data)
+/*Q_EXPORT*/ inline QByteArray qCompress( const QByteArray& data)
 { return qCompress( (const uchar*)data.data(), data.size() ); }
-Q_EXPORT inline QByteArray qUncompress( const QByteArray& data )
+/*Q_EXPORT*/ inline QByteArray qUncompress( const QByteArray& data )
 { return qUncompress( (const uchar*)data.data(), data.size() ); }
 #endif
 
@@ -295,61 +295,61 @@
   QCString non-member operators
  *****************************************************************************/
 
-Q_EXPORT inline bool operator==( const QCString &s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator==( const QCString &s1, const QCString &s2 )
 { return qstrcmp( s1.data(), s2.data() ) == 0; }
 
-Q_EXPORT inline bool operator==( const QCString &s1, const char *s2 )
+/*Q_EXPORT*/ inline bool operator==( const QCString &s1, const char *s2 )
 { return qstrcmp( s1.data(), s2 ) == 0; }
 
-Q_EXPORT inline bool operator==( const char *s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator==( const char *s1, const QCString &s2 )
 { return qstrcmp( s1, s2.data() ) == 0; }
 
-Q_EXPORT inline bool operator!=( const QCString &s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator!=( const QCString &s1, const QCString &s2 )
 { return qstrcmp( s1.data(), s2.data() ) != 0; }
 
-Q_EXPORT inline bool operator!=( const QCString &s1, const char *s2 )
+/*Q_EXPORT*/ inline bool operator!=( const QCString &s1, const char *s2 )
 { return qstrcmp( s1.data(), s2 ) != 0; }
 
-Q_EXPORT inline bool operator!=( const char *s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator!=( const char *s1, const QCString &s2 )
 { return qstrcmp( s1, s2.data() ) != 0; }
 
-Q_EXPORT inline bool operator<( const QCString &s1, const QCString& s2 )
+/*Q_EXPORT*/ inline bool operator<( const QCString &s1, const QCString& s2 )
 { return qstrcmp( s1.data(), s2.data() ) < 0; }
 
-Q_EXPORT inline bool operator<( const QCString &s1, const char *s2 )
+/*Q_EXPORT*/ inline bool operator<( const QCString &s1, const char *s2 )
 { return qstrcmp( s1.data(), s2 ) < 0; }
 
-Q_EXPORT inline bool operator<( const char *s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator<( const char *s1, const QCString &s2 )
 { return qstrcmp( s1, s2.data() ) < 0; }
 
-Q_EXPORT inline bool operator<=( const QCString &s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator<=( const QCString &s1, const QCString &s2 )
 { return qstrcmp( s1.data(), s2.data() ) <= 0; }
 
-Q_EXPORT inline bool operator<=( const QCString &s1, const char *s2 )
+/*Q_EXPORT*/ inline bool operator<=( const QCString &s1, const char *s2 )
 { return qstrcmp( s1.data(), s2 ) <= 0; }
 
-Q_EXPORT inline bool operator<=( const char *s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator<=( const char *s1, const QCString &s2 )
 { return qstrcmp( s1, s2.data() ) <= 0; }
 
-Q_EXPORT inline bool operator>( const QCString &s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator>( const QCString &s1, const QCString &s2 )
 { return qstrcmp( s1.data(), s2.data() ) > 0; }
 
-Q_EXPORT inline bool operator>( const QCString &s1, const char *s2 )
+/*Q_EXPORT*/ inline bool operator>( const QCString &s1, const char *s2 )
 { return qstrcmp( s1.data(), s2 ) > 0; }
 
-Q_EXPORT inline bool operator>( const char *s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator>( const char *s1, const QCString &s2 )
 { return qstrcmp( s1, s2.data() ) > 0; }
 
-Q_EXPORT inline bool operator>=( const QCString &s1, const QCString& s2 )
+/*Q_EXPORT*/ inline bool operator>=( const QCString &s1, const QCString& s2 )
 { return qstrcmp( s1.data(), s2.data() ) >= 0; }
 
-Q_EXPORT inline bool operator>=( const QCString &s1, const char *s2 )
+/*Q_EXPORT*/ inline bool operator>=( const QCString &s1, const char *s2 )
 { return qstrcmp( s1.data(), s2 ) >= 0; }
 
-Q_EXPORT inline bool operator>=( const char *s1, const QCString &s2 )
+/*Q_EXPORT*/ inline bool operator>=( const char *s1, const QCString &s2 )
 { return qstrcmp( s1, s2.data() ) >= 0; }
 
-Q_EXPORT inline const QCString operator+( const QCString &s1,
+/*Q_EXPORT*/ inline const QCString operator+( const QCString &s1,
 					  const QCString &s2 )
 {
     QCString tmp( s1.data() );
@@ -357,28 +357,28 @@
     return tmp;
 }
 
-Q_EXPORT inline const QCString operator+( const QCString &s1, const char *s2 )
+/*Q_EXPORT*/ inline const QCString operator+( const QCString &s1, const char *s2 )
 {
     QCString tmp( s1.data() );
     tmp += s2;
     return tmp;
 }
 
-Q_EXPORT inline const QCString operator+( const char *s1, const QCString &s2 )
+/*Q_EXPORT*/ inline const QCString operator+( const char *s1, const QCString &s2 )
 {
     QCString tmp( s1 );
     tmp += s2;
     return tmp;
 }
 
-Q_EXPORT inline const QCString operator+( const QCString &s1, char c2 )
+/*Q_EXPORT*/ inline const QCString operator+( const QCString &s1, char c2 )
 {
     QCString tmp( s1.data() );
     tmp += c2;
     return tmp;
 }
 
-Q_EXPORT inline const QCString operator+( char c1, const QCString &s2 )
+/*Q_EXPORT*/ inline const QCString operator+( char c1, const QCString &s2 )
 {
     QCString tmp;
     tmp += c1;
diff -ur original/qt-3.3.x-p8/src/tools/qstring.h qt-3.3.x-p8/src/tools/qstring.h
--- original/qt-3.3.x-p8/src/tools/qstring.h	2007-05-07 04:35:25.000000000 -0400
+++ qt-3.3.x-p8/src/tools/qstring.h	2007-10-04 21:59:55.130000000 -0400
@@ -1032,7 +1032,7 @@
 Q_EXPORT bool operator>=( const char *s1, const QString &s2 );
 #endif
 
-Q_EXPORT inline const QString operator+( const QString &s1, const QString &s2 )
+/*Q_EXPORT*/ inline const QString operator+( const QString &s1, const QString &s2 )
 {
     QString tmp( s1 );
     tmp += s2;
@@ -1040,14 +1040,14 @@
 }
 
 #ifndef QT_NO_CAST_ASCII
-Q_EXPORT inline const QString operator+( const QString &s1, const char *s2 )
+/*Q_EXPORT*/ inline const QString operator+( const QString &s1, const char *s2 )
 {
     QString tmp( s1 );
     tmp += QString::fromAscii(s2);
     return tmp;
 }
 
-Q_EXPORT inline const QString operator+( const char *s1, const QString &s2 )
+/*Q_EXPORT*/ inline const QString operator+( const char *s1, const QString &s2 )
 {
     QString tmp = QString::fromAscii( s1 );
     tmp += s2;
@@ -1055,21 +1055,21 @@
 }
 #endif
 
-Q_EXPORT inline const QString operator+( const QString &s1, QChar c2 )
+/*Q_EXPORT*/ inline const QString operator+( const QString &s1, QChar c2 )
 {
     QString tmp( s1 );
     tmp += c2;
     return tmp;
 }
 
-Q_EXPORT inline const QString operator+( const QString &s1, char c2 )
+/*Q_EXPORT*/ inline const QString operator+( const QString &s1, char c2 )
 {
     QString tmp( s1 );
     tmp += c2;
     return tmp;
 }
 
-Q_EXPORT inline const QString operator+( QChar c1, const QString &s2 )
+/*Q_EXPORT*/ inline const QString operator+( QChar c1, const QString &s2 )
 {
     QString tmp;
     tmp += c1;
@@ -1077,7 +1077,7 @@
     return tmp;
 }
 
-Q_EXPORT inline const QString operator+( char c1, const QString &s2 )
+/*Q_EXPORT*/ inline const QString operator+( char c1, const QString &s2 )
 {
     QString tmp;
     tmp += c1;
@@ -1086,12 +1086,12 @@
 }
 
 #ifndef QT_NO_STL
-Q_EXPORT inline const QString operator+(const QString& s1, const std::string& s2)
+/*Q_EXPORT*/ inline const QString operator+(const QString& s1, const std::string& s2)
 {
     return s1 + QString(s2);
 }
 
-Q_EXPORT inline const QString operator+(const std::string& s1, const QString& s2)
+/*Q_EXPORT*/ inline const QString operator+(const std::string& s1, const QString& s2)
 {
     QString tmp(s2);
     return QString(tmp.prepend(s1));
diff -ur original/qt-3.3.x-p8/src/tools/qtextstream.h qt-3.3.x-p8/src/tools/qtextstream.h
--- original/qt-3.3.x-p8/src/tools/qtextstream.h	2007-05-07 04:35:25.000000000 -0400
+++ qt-3.3.x-p8/src/tools/qtextstream.h	2007-10-04 22:00:12.587000000 -0400
@@ -295,13 +295,13 @@
     int	   arg;					// member function argument
 };
 
-Q_EXPORT inline QTextStream &operator>>( QTextStream &s, QTSFUNC f )
+/*Q_EXPORT*/ inline QTextStream &operator>>( QTextStream &s, QTSFUNC f )
 { return (*f)( s ); }
 
-Q_EXPORT inline QTextStream &operator<<( QTextStream &s, QTSFUNC f )
+/*Q_EXPORT*/ inline QTextStream &operator<<( QTextStream &s, QTSFUNC f )
 { return (*f)( s ); }
 
-Q_EXPORT inline QTextStream &operator<<( QTextStream &s, QTSManip m )
+/*Q_EXPORT*/ inline QTextStream &operator<<( QTextStream &s, QTSManip m )
 { m.exec(s); return s; }
 
 Q_EXPORT QTextStream &bin( QTextStream &s );	// set bin notation
@@ -313,19 +313,19 @@
 Q_EXPORT QTextStream &ws( QTextStream &s );	// eat whitespace on input
 Q_EXPORT QTextStream &reset( QTextStream &s );	// set default flags
 
-Q_EXPORT inline QTSManip qSetW( int w )
+/*Q_EXPORT*/ inline QTSManip qSetW( int w )
 {
     QTSMFI func = &QTextStream::width;
     return QTSManip(func,w);
 }
 
-Q_EXPORT inline QTSManip qSetFill( int f )
+/*Q_EXPORT*/ inline QTSManip qSetFill( int f )
 {
     QTSMFI func = &QTextStream::fill;
     return QTSManip(func,f);
 }
 
-Q_EXPORT inline QTSManip qSetPrecision( int p )
+/*Q_EXPORT*/ inline QTSManip qSetPrecision( int p )
 {
     QTSMFI func = &QTextStream::precision;
     return QTSManip(func,p);
diff -ur original/qt-3.3.x-p8/src/tools/qwaitcondition_win.cpp qt-3.3.x-p8/src/tools/qwaitcondition_win.cpp
--- original/qt-3.3.x-p8/src/tools/qwaitcondition_win.cpp	2007-05-07 04:35:25.000000000 -0400
+++ qt-3.3.x-p8/src/tools/qwaitcondition_win.cpp	2007-11-30 12:58:26.161000000 -0500
@@ -1,177 +1,199 @@
-/****************************************************************************
-** $Id: qwaitcondition_win.cpp 1964 2006-12-15 12:14:12Z chehrlic $
-**
-** QWaitCondition class for Windows
-**
-** From Wolfpack 3.3.1 release + sync with Qt4.0.0 by Christian Ehrlicher
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** 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.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact kde-cygwin@kde.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#if defined(QT_THREAD_SUPPORT)
-
-#include "qwaitcondition.h"
-#include "qnamespace.h"
-#include "qmutex.h"
-#include "qptrlist.h"
-#include "qt_windows.h"
-#include <private/qcriticalsection_p.h>
-
-#define Q_MUTEX_T void*
-#include <private/qmutex_p.h>
-
-class QWaitConditionEvent
-{
-public:
-    inline QWaitConditionEvent() : priority( 0 )
-    {
-        QT_WA ( {
-                    event = CreateEvent( NULL, true, false, NULL );
-                }, {
-                    event = CreateEventA( NULL, true, false, NULL );
-                } );
-    }
-    inline ~QWaitConditionEvent()
-    {
-        CloseHandle( event );
-    }
-    int priority;
-    HANDLE event;
-};
-
-typedef QPtrList<QWaitConditionEvent> EventQueue;
-
-class QWaitConditionPrivate
-{
-public:
-    QCriticalSection cs;
-    EventQueue queue;
-    EventQueue freeQueue;
-
-    bool wait( QMutex *mutex, unsigned long time );
-};
-
-bool QWaitConditionPrivate::wait( QMutex *mutex, unsigned long time )
-{
-    bool ret = false;
-
-    cs.enter();
-    QWaitConditionEvent *wce =
-        freeQueue.isEmpty() ? new QWaitConditionEvent : freeQueue.getFirst();
-    wce->priority = GetThreadPriority( GetCurrentThread() );
-
-    // insert 'wce' into the queue (sorted by priority)
-    int index = 0;
-    for ( ; index < queue.count(); ++index ) {
-        QWaitConditionEvent *current = queue.at( index );
-        if ( current->priority < wce->priority )
-            break;
-    }
-    queue.insert( index, wce );
-    cs.leave();
-
-    if(mutex)
-        mutex->unlock();
-
-    // wait for the event
-    switch ( WaitForSingleObject( wce->event, time ) ) {
-    default:
-        break;
-
-    case WAIT_OBJECT_0:
-        ret = true;
-        break;
-    }
-
-    if(mutex)
-        mutex->lock ();
-
-    cs.enter();
-    // remove 'wce' from the queue
-    while ( queue.remove( wce ) ) {};
-    ResetEvent( wce->event );
-    freeQueue.append( wce );
-    cs.leave();
-
-    return ret;
-}
-
-//***********************************************************************
-// QWaitCondition implementation
-//***********************************************************************
-
-QWaitCondition::QWaitCondition()
-{
-    d = new QWaitConditionPrivate;
-}
-
-QWaitCondition::~QWaitCondition()
-{
-    if ( !d->queue.isEmpty() ) {
-        qWarning( "QWaitCondition: destroyed while threads are still waiting" );
-        while ( d->queue.remove() ) {};
-    }
-
-    while ( d->freeQueue.remove() ) {};
-    delete d;
-}
-
-void QWaitCondition::wakeOne()
-{
-    // wake up the first thread in the queue
-    d->cs.enter();
-    if ( !d->queue.isEmpty() ) {
-        QWaitConditionEvent * first = d->queue.first();
-        SetEvent( first->event );
-    }
-    d->cs.leave();
-}
-
-void QWaitCondition::wakeAll()
-{
-    // wake up the all threads in the queue
-    d->cs.enter();
-    for ( int i = 0; i < d->queue.count(); ++i ) {
-        QWaitConditionEvent *current = d->queue.at( i );
-        SetEvent( current->event );
-    }
-    d->cs.leave();
-}
-
-bool QWaitCondition::wait( unsigned long time )
-{
-    return wait( 0, time );
-}
-
-bool QWaitCondition::wait( QMutex *mutex, unsigned long time )
-{
-    if ( !mutex )
-        return false;
-
-    if ( mutex->d->type() == Q_MUTEX_RECURSIVE ) {
-        qWarning( "QWaitCondition::wait: Cannot wait on recursive mutexes." );
-        return false;
-    }
-    return d->wait( mutex, time );
-}
-
-#endif // QT_THREAD_SUPPORT
+/****************************************************************************
+** $Id: qwaitcondition_win.cpp 1964 2006-12-15 12:14:12Z chehrlic $
+**
+** QWaitCondition class for Windows
+**
+** From Wolfpack 3.3.1 release + sync with Qt4.0.0 by Christian Ehrlicher
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** 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.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** Contact kde-cygwin@kde.org if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#if defined(QT_THREAD_SUPPORT)
+
+#include "qwaitcondition.h"
+#include "qnamespace.h"
+#include "qmutex.h"
+#include "qptrlist.h"
+#include "qt_windows.h"
+#include <private/qcriticalsection_p.h>
+
+#define Q_MUTEX_T void*
+#include <private/qmutex_p.h>
+
+class QWaitConditionEvent
+{
+public:
+    inline QWaitConditionEvent() : priority( 0 ), wokenUp(false)
+    {
+        QT_WA ( {
+                    event = CreateEvent( NULL, true, false, NULL );
+                }, {
+                    event = CreateEventA( NULL, true, false, NULL );
+                } );
+    }
+    inline ~QWaitConditionEvent()
+    {
+        CloseHandle( event );
+    }
+    int priority;
+    bool wokenUp;
+    HANDLE event;
+};
+
+typedef QPtrList<QWaitConditionEvent> EventQueue;
+
+class QWaitConditionPrivate
+{
+public:
+    QCriticalSection cs;
+    EventQueue queue;
+    EventQueue freeQueue;
+
+    bool wait( QMutex *mutex, unsigned long time );
+};
+
+bool QWaitConditionPrivate::wait( QMutex *mutex, unsigned long time )
+{
+    bool ret = false;
+
+    cs.enter();
+    QWaitConditionEvent *wce =
+        freeQueue.isEmpty() ? new QWaitConditionEvent : freeQueue.getFirst();
+    wce->priority = GetThreadPriority( GetCurrentThread() );
+    wce->wokenUp = false;
+
+	// insert 'wce' into the queue (sorted by priority)
+    int index = 0;
+    for ( ; index < queue.count(); ++index ) {
+        QWaitConditionEvent *current = queue.at( index );
+        if ( current->priority < wce->priority )
+            break;
+    }
+    queue.insert( index, wce );
+    cs.leave();
+
+    if(mutex)
+        mutex->unlock();
+
+    // wait for the event
+    switch ( WaitForSingleObject( wce->event, time ) ) {
+    default:
+        break;
+
+    case WAIT_OBJECT_0:
+        ret = true;
+        break;
+    }
+
+	if(mutex)
+        mutex->lock ();
+
+    cs.enter();
+    // remove 'wce' from the queue
+    while ( queue.remove( wce ) ) {};
+
+	ResetEvent( wce->event );
+    freeQueue.append( wce );
+
+    // wakeups delivered after the timeout should be forwarded to the next waiter
+    if (!ret && wce->wokenUp && !queue.isEmpty()) {
+        QWaitConditionEvent *other = queue.first();
+        SetEvent(other->event);
+        other->wokenUp = true;
+    }
+	cs.leave();
+
+    return ret;
+}
+
+//***********************************************************************
+// QWaitCondition implementation
+//***********************************************************************
+
+QWaitCondition::QWaitCondition()
+{
+    d = new QWaitConditionPrivate;
+}
+
+QWaitCondition::~QWaitCondition()
+{
+    if ( !d->queue.isEmpty() ) {
+        qWarning( "QWaitCondition: destroyed while threads are still waiting" );
+        while ( d->queue.remove() ) {};
+    }
+
+    while ( d->freeQueue.remove() ) {};
+    delete d;
+}
+
+void QWaitCondition::wakeOne()
+{
+    //// wake up the first thread in the queue
+    //d->cs.enter();
+    //if ( !d->queue.isEmpty() ) {
+    //    QWaitConditionEvent * first = d->queue.first();
+    //    SetEvent( first->event );
+    //}
+    //d->cs.leave();
+    // wake up the first waiting thread in the queue
+    d->cs.enter();
+    for (int i = 0; i < d->queue.count(); ++i) {
+        QWaitConditionEvent *current = d->queue.at(i);
+        if (current->wokenUp)
+            continue;
+
+		SetEvent(current->event);
+        current->wokenUp = true;
+        break;
+    }
+	d->cs.leave();
+}
+
+void QWaitCondition::wakeAll()
+{
+    // wake up the all threads in the queue
+    d->cs.enter();
+    for ( int i = 0; i < d->queue.count(); ++i ) {
+        QWaitConditionEvent *current = d->queue.at( i );
+		SetEvent( current->event );
+    }
+    d->cs.leave();
+}
+
+bool QWaitCondition::wait( unsigned long time )
+{
+    return d->wait( 0, time );
+}
+
+bool QWaitCondition::wait( QMutex *mutex, unsigned long time )
+{
+    if ( !mutex )
+        return false;
+
+    if ( mutex->d->type() == Q_MUTEX_RECURSIVE ) {
+        qWarning( "QWaitCondition::wait: Cannot wait on recursive mutexes." );
+        return false;
+    }
+    return d->wait( mutex, time );
+}
+
+#endif // QT_THREAD_SUPPORT
--- original/qt-3.3.x-p8/src/tools/qmutex_win.cpp	2007-12-29 00:53:15.797000000 -0500
+++ qt-3.3.x-p8/src/tools/qmutex_win.cpp	2007-12-29 00:08:58.258000000 -0500
@@ -225,38 +225,14 @@
 
 bool QRealMutexPrivate::locked()
 {
-    criticalsection.enter();
-    if ( GetCurrentThreadId() == owner ) {
-        criticalsection.leave();
+    if (!trylock())
         return true;
-    }
-
-    switch ( ::WaitForSingleObject( handle, 0 ) ) {
-    case WAIT_ABANDONED:    // 0x80
-        qSystemWarning( "QRealMutexPrivate::locked() - ::WaitForSingleObject() returned WAIT_ABANDONED" );
-        return false;
-    case WAIT_TIMEOUT:      // 0x102
-        return false;
-    case WAIT_FAILED:       // ~0U
-        return false;
-    default:
-        criticalsection.enter();
-        owner = GetCurrentThreadId();
-        criticalsection.leave();
-        break;
-    }
-    return true;
+    unlock();
+    return false;
 }
 
 bool QRealMutexPrivate::trylock()
 {
-    criticalsection.enter();
-    if ( GetCurrentThreadId() == owner ) {
-        criticalsection.leave();
-        return false;
-    }
-    criticalsection.leave();
-
     switch ( ::WaitForSingleObject( handle, 0 ) ) {
     case WAIT_FAILED:
     case WAIT_TIMEOUT:
