diff -ruN qt-x11-commercial-src-4.1.4/config.tests/unix/ipv6/ipv6test.cpp qt-x11-commercial-src-4.1.4-patched/config.tests/unix/ipv6/ipv6test.cpp
--- qt-x11-commercial-src-4.1.4/config.tests/unix/ipv6/ipv6test.cpp	2006-06-19 06:50:59.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/config.tests/unix/ipv6/ipv6test.cpp	2006-07-21 19:32:33.256224006 -0400
@@ -15,6 +15,8 @@
     sockaddr_storage tmp2;
     (void)tmp;
     (void)tmp2;
-
+    /* not all systems support sin6_scope_id, but we require it
+     * so let's make sure that variable exists in sockaddr_in6 */
+    (void)tmp.sin6_scope_id;
     return 0;
 }
diff -ruN qt-x11-commercial-src-4.1.4/mkspecs/sco-cc/qmake.conf qt-x11-commercial-src-4.1.4-patched/mkspecs/sco-cc/qmake.conf
--- qt-x11-commercial-src-4.1.4/mkspecs/sco-cc/qmake.conf	2006-06-19 06:50:53.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/mkspecs/sco-cc/qmake.conf	2006-07-21 19:33:07.351264005 -0400
@@ -23,10 +23,10 @@
 QMAKE_CFLAGS_RELEASE	= -O
 QMAKE_CFLAGS_DEBUG	= -g
 QMAKE_CFLAGS_SHLIB	= -KPIC
-QMAKE_CFLAGS_YACC	= -Wf,--diag_suppress,111 -Wf,--diag_suppress,177
+QMAKE_CFLAGS_YACC	= -Wf,--diag_suppress -Wf,111 -Wf,--diag_suppress -Wf,177
 
 QMAKE_CXX		= CC
-QMAKE_CXXFLAGS		= $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838
+QMAKE_CXXFLAGS		= $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress -Wf,838 -Wf,--diag_suppress -Wf,816 -Wf,--diag_suppress -Wf,111 -Wf,--diag_suppress -Wf,177 -Wf,--diag_suppress -Wf,550
 QMAKE_CXXFLAGS_WARN_ON	= $$QMAKE_CFLAGS_WARN_ON
 QMAKE_CXXFLAGS_WARN_OFF	= $$QMAKE_CFLAGS_WARN_OFF
 QMAKE_CXXFLAGS_RELEASE	= $$QMAKE_CFLAGS_RELEASE -Tused
@@ -37,7 +37,7 @@
 QMAKE_INCDIR		=
 QMAKE_LIBDIR		=
 QMAKE_INCDIR_X11	=
-QMAKE_LIBDIR_X11	= /usr/X/lib
+QMAKE_LIBDIR_X11	= /usr/X11R6/lib
 QMAKE_INCDIR_QT		= $$[QT_INSTALL_HEADERS]
 QMAKE_LIBDIR_QT		= $$[QT_INSTALL_LIBS]
 QMAKE_INCDIR_OPENGL	=
@@ -45,7 +45,7 @@
 
 QMAKE_LINK		= CC
 QMAKE_LINK_SHLIB	= CC
-QMAKE_LFLAGS		=
+QMAKE_LFLAGS		= -Wl,-z -Wl,multidefs
 QMAKE_LFLAGS_RELEASE	=
 QMAKE_LFLAGS_DEBUG	=
 QMAKE_LFLAGS_SHLIB	= -G
@@ -56,7 +56,7 @@
 QMAKE_LIBS_DYNLOAD	= -ldl
 QMAKE_LIBS_X11		= -lXext -lX11 -lresolv -lsocket -lnsl -lm
 QMAKE_LIBS_X11SM	= -lSM -lICE
-
+QMAKE_LIBS_THREAD	= -lpthread
 QMAKE_LIBS_OPENGL	= -lGLU -lGL -lXt
 QMAKE_LIBS_OPENGL_QT	= -lGL
 
diff -ruN qt-x11-commercial-src-4.1.4/src/corelib/arch/i386/arch.pri qt-x11-commercial-src-4.1.4-patched/src/corelib/arch/i386/arch.pri
--- qt-x11-commercial-src-4.1.4/src/corelib/arch/i386/arch.pri	2006-06-19 06:51:02.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/corelib/arch/i386/arch.pri	2006-07-21 19:36:09.631264001 -0400
@@ -9,4 +9,10 @@
 
 HEADERS += $$ARCH_H/qatomic.h
 
-!*-g++*:!*-icc*:SOURCES += $$ARCH_CPP/qatomic.s
+!*-g++*:!*-icc*:!*sco-cc*:SOURCES += $$ARCH_CPP/qatomic.s
+
+# All other platforms should be able to use the .S version
+# which just allows the C preprocessor to be run on it, but
+# since we're only testing on SCO, we don't want to mess
+# up any other platforms
+*sco-cc*:SOURCES += $$ARCH_CPP/qatomic.S
diff -ruN qt-x11-commercial-src-4.1.4/src/corelib/arch/i386/qatomic.S qt-x11-commercial-src-4.1.4-patched/src/corelib/arch/i386/qatomic.S
--- qt-x11-commercial-src-4.1.4/src/corelib/arch/i386/qatomic.S	1969-12-31 19:00:00.000000000 -0500
+++ qt-x11-commercial-src-4.1.4-patched/src/corelib/arch/i386/qatomic.S	2006-07-21 19:36:33.677344000 -0400
@@ -0,0 +1,88 @@
+#if defined(__SCO_VERSION__) && defined(__USLC__)
+/* SCO's gives 'maximum fill size for .align out of range: 0x90'
+ * error otherwise */
+#define __ALIGN__ .align 4
+#else
+#define __ALIGN__ .align 4,0x90
+#endif
+
+	.text
+
+	__ALIGN__
+
+	.globl q_atomic_test_and_set_int
+q_atomic_test_and_set_int:
+	movl		 4(%esp),%ecx
+	movl		 8(%esp),%eax
+	movl		12(%esp),%edx
+	lock
+	cmpxchgl	%edx,(%ecx)
+	mov		$0,%eax
+ 	sete		%al
+	ret
+	__ALIGN__
+	.type q_atomic_test_and_set_int,@function
+	.size q_atomic_test_and_set_int,.-q_atomic_test_and_set_int
+
+	__ALIGN__
+	.globl q_atomic_test_and_set_ptr
+q_atomic_test_and_set_ptr:
+	movl		 4(%esp),%ecx
+	movl		 8(%esp),%eax
+	movl		12(%esp),%edx
+	lock 
+	cmpxchgl	%edx,(%ecx)
+	mov		$0,%eax
+	sete		%al
+	ret
+	__ALIGN__
+	.type	q_atomic_test_and_set_ptr,@function
+	.size	q_atomic_test_and_set_ptr,.-q_atomic_test_and_set_ptr
+
+	__ALIGN__
+	.globl q_atomic_increment
+q_atomic_increment:
+	movl 4(%esp), %ecx
+	lock 
+	incl (%ecx)
+	mov $0,%eax
+	setne %al
+	ret
+	__ALIGN__
+	.type q_atomic_increment,@function
+	.size	q_atomic_increment,.-q_atomic_increment
+
+	__ALIGN__
+	.globl q_atomic_decrement
+q_atomic_decrement:
+	movl 4(%esp), %ecx
+	lock 
+	decl (%ecx)
+	mov $0,%eax
+	setne %al
+	ret
+	__ALIGN__
+	.type q_atomic_decrement,@function
+	.size	q_atomic_decrement,.-q_atomic_decrement
+
+	__ALIGN__
+	.globl q_atomic_set_int
+q_atomic_set_int:
+	mov 4(%esp),%ecx
+	mov 8(%esp),%eax
+	xchgl %eax,(%ecx)
+	ret	
+	__ALIGN__
+	.type q_atomic_set_int,@function
+	.size	q_atomic_set_int,.-q_atomic_set_int
+
+	__ALIGN__
+	.globl q_atomic_set_ptr
+q_atomic_set_ptr:
+	mov 4(%esp),%ecx
+	mov 8(%esp),%eax
+	xchgl %eax,(%ecx)
+	ret	
+	__ALIGN__
+	.type q_atomic_set_ptr,@function
+	.size	q_atomic_set_ptr,.-q_atomic_set_ptr
diff -ruN qt-x11-commercial-src-4.1.4/src/corelib/global/qglobal.h qt-x11-commercial-src-4.1.4-patched/src/corelib/global/qglobal.h
--- qt-x11-commercial-src-4.1.4/src/corelib/global/qglobal.h	2006-06-19 06:50:54.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/corelib/global/qglobal.h	2006-07-21 19:32:33.603424015 -0400
@@ -430,7 +430,16 @@
 #    endif
 #  endif
 
-/* Never tested! */
+/* SCO Openserver 6 compiler does not define __EDG__ */
+#elif defined(__USLC__) && defined(__SCO_VERSION__)
+#  define Q_CC_EDG
+#  if !defined(_BOOL) && !defined(__BOOL_DEFINED)
+#    define Q_NO_BOOL_TYPE
+#  endif
+#  define Q_CC_USLC
+#  define Q_NO_USING_KEYWORD
+
+/* Never Tested! */
 #elif defined(__HIGHC__)
 #  define Q_CC_HIGHC
 
diff -ruN qt-x11-commercial-src-4.1.4/src/corelib/io/qfsfileengine_unix.cpp qt-x11-commercial-src-4.1.4-patched/src/corelib/io/qfsfileengine_unix.cpp
--- qt-x11-commercial-src-4.1.4/src/corelib/io/qfsfileengine_unix.cpp	2006-06-19 06:50:54.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/corelib/io/qfsfileengine_unix.cpp	2006-07-21 19:32:33.861344009 -0400
@@ -538,8 +538,12 @@
 QString QFSFileEngine::owner(FileOwner own) const
 {
 #if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+#if !defined(_SC_GETPW_R_SIZE_MAX)
+    QVarLengthArray<char, 1024> buf(1024);
+#else
     QVarLengthArray<char, 1024> buf(sysconf(_SC_GETPW_R_SIZE_MAX));
 #endif
+#endif
 
     if(own == OwnerUser) {
         struct passwd *pw = 0;
@@ -554,7 +558,11 @@
     } else if(own == OwnerGroup) {
         struct group *gr = 0;
 #if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+#if !defined(_SC_GETGR_R_SIZE_MAX)
+        buf.resize(1024);
+#else
         buf.resize(sysconf(_SC_GETGR_R_SIZE_MAX));
+#endif
         struct group entry;
         getgrgid_r(ownerId(own), &entry, buf.data(), buf.size(), &gr);
 #else
diff -ruN qt-x11-commercial-src-4.1.4/src/corelib/kernel/qabstractitemmodel.h qt-x11-commercial-src-4.1.4-patched/src/corelib/kernel/qabstractitemmodel.h
--- qt-x11-commercial-src-4.1.4/src/corelib/kernel/qabstractitemmodel.h	2006-06-19 06:50:55.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/corelib/kernel/qabstractitemmodel.h	2006-07-21 19:32:58.839904006 -0400
@@ -128,6 +128,9 @@
     virtual ~QAbstractItemModel();
 
     bool hasIndex(int row, int column, const QModelIndex &parent = QModelIndex()) const;
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     virtual QModelIndex index(int row, int column,
                               const QModelIndex &parent = QModelIndex()) const = 0;
     virtual QModelIndex parent(const QModelIndex &child) const = 0;
diff -ruN qt-x11-commercial-src-4.1.4/src/corelib/tools/qchar.h qt-x11-commercial-src-4.1.4-patched/src/corelib/tools/qchar.h
--- qt-x11-commercial-src-4.1.4/src/corelib/tools/qchar.h	2006-06-19 06:50:55.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/corelib/tools/qchar.h	2006-07-21 19:33:07.539744007 -0400
@@ -268,7 +268,7 @@
 inline const char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); }
 inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); }
 
-inline QChar::QChar(uchar c, uchar r) : ucs((r << 8) | c){}
+inline QChar::QChar(uchar c, uchar r) : ucs((ushort(r) << 8) | c){}
 inline QChar::QChar(short rc) : ucs(ushort(rc)){}
 inline QChar::QChar(uint rc) : ucs(ushort(rc & 0xffff)){}
 inline QChar::QChar(int rc) : ucs(ushort(rc & 0xffff)){}
diff -ruN qt-x11-commercial-src-4.1.4/src/gui/kernel/qapplication_x11.cpp qt-x11-commercial-src-4.1.4-patched/src/gui/kernel/qapplication_x11.cpp
--- qt-x11-commercial-src-4.1.4/src/gui/kernel/qapplication_x11.cpp	2006-06-19 06:50:55.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/gui/kernel/qapplication_x11.cpp	2006-07-21 19:32:33.980384012 -0400
@@ -830,10 +830,19 @@
                         sysFont = value.left(value.lastIndexOf(QLatin1Char(':')));
                     if (!font && key == QLatin1String("font"))
                         resFont = value;
+/* SCO OpenServer 6 returns 'scoBackground' and 'scoForeground', these 
+ * are not valid Qt colors, so the application interface is not usable as
+ * it's all black.  When Qt calls a setNamedColor(), it really
+ * should do an XAllocNamedColor to lookup the colors as X knows them if
+ * they cannot be found in the preset colormap.  Removing this section
+ * of code works fine though, as the defaults are good.
+ */
+#ifndef Q_OS_UNIXWARE
                     else if  (!paletteAlreadySet && !fg && key == QLatin1String("foreground"))
                         resFG = value;
                     else if (!paletteAlreadySet && !bg && key == QLatin1String("background"))
                         resBG = value;
+#endif
                     else if (key == QLatin1String("guieffects"))
                         resEF = value;
                     // NOTE: if you add more, change the [fbg] stuff above
@@ -5553,7 +5562,11 @@
     // tell the session manager about our user as well.
     struct passwd *entryPtr = 0;
 #if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+#ifndef _SC_GETPW_R_SIZE_MAX
+    QVarLengthArray<char, 1024> buf(1024);
+#else
     QVarLengthArray<char, 1024> buf(sysconf(_SC_GETPW_R_SIZE_MAX));
+#endif
     struct passwd entry;
     getpwuid_r(geteuid(), &entry, buf.data(), buf.size(), &entryPtr);
 #else
diff -ruN qt-x11-commercial-src-4.1.4/src/gui/kernel/qlayout.h qt-x11-commercial-src-4.1.4-patched/src/gui/kernel/qlayout.h
--- qt-x11-commercial-src-4.1.4/src/gui/kernel/qlayout.h	2006-06-19 06:50:56.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/gui/kernel/qlayout.h	2006-07-21 19:32:58.879584008 -0400
@@ -40,6 +40,9 @@
 class Q_GUI_EXPORT QLayoutIterator
 {
 public:
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     inline QT3_SUPPORT_CONSTRUCTOR QLayoutIterator(QLayout *i) : layout(i), index(0) {}
     inline QLayoutIterator(const QLayoutIterator &i)
 	: layout(i.layout), index(i.index) {}
diff -ruN qt-x11-commercial-src-4.1.4/src/gui/painting/qregion_unix.cpp qt-x11-commercial-src-4.1.4-patched/src/gui/painting/qregion_unix.cpp
--- qt-x11-commercial-src-4.1.4/src/gui/painting/qregion_unix.cpp	2006-06-19 06:50:56.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/gui/painting/qregion_unix.cpp	2006-07-21 19:33:07.926624014 -0400
@@ -2090,7 +2090,7 @@
             UnionRectWithRegion(&xr, region, *region); \
         }
 
-    const uint zero = 0;
+    const uchar zero = 0;
     bool little = image.format() == QImage::Format_MonoLSB;
 
     int x,
diff -ruN qt-x11-commercial-src-4.1.4/src/gui/text/qfontengine_p.h qt-x11-commercial-src-4.1.4-patched/src/gui/text/qfontengine_p.h
--- qt-x11-commercial-src-4.1.4/src/gui/text/qfontengine_p.h	2006-06-19 06:50:55.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/gui/text/qfontengine_p.h	2006-07-21 19:32:58.949024006 -0400
@@ -103,6 +103,9 @@
     virtual QByteArray getSfntTable(uint /*tag*/) const { return QByteArray(); }
 
     struct FaceId {
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
         FaceId() : index(0), encoding(0) {}
         QByteArray filename;
         int index;
diff -ruN qt-x11-commercial-src-4.1.4/src/plugins/imageformats/jpeg/qjpeghandler.cpp qt-x11-commercial-src-4.1.4-patched/src/plugins/imageformats/jpeg/qjpeghandler.cpp
--- qt-x11-commercial-src-4.1.4/src/plugins/imageformats/jpeg/qjpeghandler.cpp	2006-06-19 06:51:02.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/plugins/imageformats/jpeg/qjpeghandler.cpp	2006-07-21 19:32:34.238304018 -0400
@@ -43,9 +43,11 @@
 #endif
 
 #define XMD_H           // shut JPEGlib up
+/* Does not work on SCO OpenServer 6
 #if defined(Q_OS_UNIXWARE)
 #  define HAVE_BOOLEAN  // libjpeg under Unixware seems to need this
 #endif
+*/
 #include <jpeglib.h>
 #ifdef const
 #  undef const          // remove crazy C hackery in jconfig.h
diff -ruN qt-x11-commercial-src-4.1.4/src/qt3support/itemviews/q3iconview.h qt-x11-commercial-src-4.1.4-patched/src/qt3support/itemviews/q3iconview.h
--- qt-x11-commercial-src-4.1.4/src/qt3support/itemviews/q3iconview.h	2006-06-19 06:50:56.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/qt3support/itemviews/q3iconview.h	2006-07-21 19:32:58.998624014 -0400
@@ -136,7 +136,9 @@
     Q3IconView *iconView() const;
     Q3IconViewItem *prevItem() const;
     Q3IconViewItem *nextItem() const;
-
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     int index() const;
 
     virtual void setSelected(bool s, bool cb);
diff -ruN qt-x11-commercial-src-4.1.4/src/qt3support/itemviews/q3listbox.h qt-x11-commercial-src-4.1.4-patched/src/qt3support/itemviews/q3listbox.h
--- qt-x11-commercial-src-4.1.4/src/qt3support/itemviews/q3listbox.h	2006-06-19 06:50:56.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/qt3support/itemviews/q3listbox.h	2006-07-21 19:32:59.107744006 -0400
@@ -122,6 +122,9 @@
     QSize        minimumSizeHint() const;
 
     Q3ListBoxItem *item(int index) const;
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     int index(const Q3ListBoxItem *) const;
 
     enum StringComparisonMode {
diff -ruN qt-x11-commercial-src-4.1.4/src/qt3support/sql/q3sqlcursor.h qt-x11-commercial-src-4.1.4-patched/src/qt3support/sql/q3sqlcursor.h
--- qt-x11-commercial-src-4.1.4/src/qt3support/sql/q3sqlcursor.h	2006-06-19 06:50:56.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/qt3support/sql/q3sqlcursor.h	2006-07-21 19:32:59.177184003 -0400
@@ -60,6 +60,9 @@
     virtual void setValue(int i, const QVariant &val);
     inline void setValue(const QString &name, const QVariant &val) { setValue(indexOf(name), val); }
     virtual QSqlIndex primaryIndex(bool prime = true) const;
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     virtual QSqlIndex index(const QStringList& fieldNames) const;
     QSqlIndex index(const QString& fieldName) const;
     virtual void setPrimaryIndex(const QSqlIndex& idx);
diff -ruN qt-x11-commercial-src-4.1.4/src/qt3support/sql/q3sqlselectcursor.h qt-x11-commercial-src-4.1.4-patched/src/qt3support/sql/q3sqlselectcursor.h
--- qt-x11-commercial-src-4.1.4/src/qt3support/sql/q3sqlselectcursor.h	2006-06-19 06:50:56.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/qt3support/sql/q3sqlselectcursor.h	2006-07-21 19:32:59.197024014 -0400
@@ -43,6 +43,9 @@
 
 protected:
     QSqlIndex primaryIndex(bool = true) const { return QSqlIndex(); }
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     QSqlIndex index(const QStringList&) const { return QSqlIndex(); }
     QSqlIndex index(const QString&) const { return QSqlIndex(); }
     QSqlIndex index(const char*) const { return QSqlIndex(); }
diff -ruN qt-x11-commercial-src-4.1.4/src/qt3support/text/q3richtext_p.h qt-x11-commercial-src-4.1.4-patched/src/qt3support/text/q3richtext_p.h
--- qt-x11-commercial-src-4.1.4/src/qt3support/text/q3richtext_p.h	2006-06-19 06:50:56.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/qt3support/text/q3richtext_p.h	2006-07-21 19:32:59.236704014 -0400
@@ -285,6 +285,9 @@
     inline Q3TextParagraph *paragraph() const { return para; }
 
     Q3TextDocument *document() const;
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     int index() const;
 
     void gotoPosition(Q3TextParagraph* p, int index = 0);
diff -ruN qt-x11-commercial-src-4.1.4/src/tools/moc/moc.h qt-x11-commercial-src-4.1.4-patched/src/tools/moc/moc.h
--- qt-x11-commercial-src-4.1.4/src/tools/moc/moc.h	2006-06-19 06:50:53.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/tools/moc/moc.h	2006-07-21 19:32:59.365664010 -0400
@@ -145,6 +145,9 @@
 class Moc
 {
 public:
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     Moc()
         :index(0),
          noInclude(false),
diff -ruN qt-x11-commercial-src-4.1.4/src/xml/qxml.h qt-x11-commercial-src-4.1.4-patched/src/xml/qxml.h
--- qt-x11-commercial-src-4.1.4/src/xml/qxml.h	2006-06-19 06:50:46.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/src/xml/qxml.h	2006-07-21 19:32:59.415264006 -0400
@@ -97,7 +97,9 @@
 public:
     QXmlAttributes() {}
     virtual ~QXmlAttributes() {}
-
+#if defined(Q_OS_UNIXWARE) && defined(index)
+#undef index
+#endif
     int index(const QString& qName) const;
     int index(const QString& uri, const QString& localPart) const;
     int length() const;
diff -ruN qt-x11-commercial-src-4.1.4/tools/qtestlib/src/qtestcase.cpp qt-x11-commercial-src-4.1.4-patched/tools/qtestlib/src/qtestcase.cpp
--- qt-x11-commercial-src-4.1.4/tools/qtestlib/src/qtestcase.cpp	2006-06-19 06:50:59.000000000 -0400
+++ qt-x11-commercial-src-4.1.4-patched/tools/qtestlib/src/qtestcase.cpp	2006-07-21 19:32:34.327584013 -0400
@@ -41,7 +41,9 @@
 #ifdef Q_OS_UNIX
 #include <time.h>
 #endif
-
+#ifdef Q_OS_UNIXWARE
+#include <unistd.h>
+#endif
 
 /*!
    \namespace QTest
@@ -1317,8 +1319,10 @@
 {
     QTEST_ASSERT(ms > 0);
 
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN)
     Sleep(uint(ms));
+#elif defined(Q_OS_UNIXWARE)
+    usleep(uint(ms)*1000);
 #else
     struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
     nanosleep(&ts, NULL);

