This files documents changes of original Trolltech files which should survive the replacement with Trolltech's original files. Making our live more simple, patching original files should be avoided because such patches get lost when we upgrade to new Trolltech files. If you nevertheless change Trolltech files 1. you must have very good reasons 2. you must document and explain your changes in this file 3. and you should add the diff against the original file (mail from the kde-cygwin--cvs list). Because some of the changes made aren't here, please see qt-3-head.patch for all changes. I'll try to update this file asap. Version 3.3.3 changes ********************* * qmake/makefile.cpp (Peter Kuemmel) _________________________________________________________________________________________________________________________ qmake crashes when compiled with MSVC 8 beta (MSVC 8 don't likes NULL strings: error in open.c) I will commit a differnt patch for 3.3.4 Index: makefile.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/qmake/generators/makefile.cpp,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -r1.1.1.8 -r1.1.1.9 --- makefile.cpp 27 Aug 2004 21:08:23 -0000 1.1.1.8 +++ makefile.cpp 26 Nov 2004 14:33:04 -0000 1.1.1.9 @@ -113,6 +113,7 @@ QString fn_local = Option::fixPathToLocalOS(fileFixify(fn_target, QDir::currentDirPath(), Option::output_dir)); + if ( !fn_local) fn_local = ""; // MSVC 8 don't likes NULL strings: error in open.c int file = open(fn_local.latin1(), O_RDONLY); if(file == -1) return FALSE; @@ -248,6 +249,7 @@ QStringList &fndeps = findDependencies(f); QString fn = fileFixify(f, QDir::currentDirPath(), Option::output_dir); + if ( !fn) fn = ""; // MSVC 8 don't likes NULL strings: error in open.c fn = Option::fixPathToLocalOS(fn, FALSE); QString fix_env_fn = Option::fixPathToLocalOS(fn); _________________________________________________________________________________________________________________________ * qmake/generators/win32/borland_bmake.cpp (Andreas Hausladen) _________________________________________________________________________________________________________________________ tlib.exe splits every parameter at " ", "+" and "-". Fix this by quoting. Index: qmake/generators/win32/borland_bmake.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/qmake/generators/win32/borland_bmake.cpp,v retrieving revision 1.1.1.10 diff -u -r1.1.1.10 borland_bmake.cpp --- qmake/generators/win32/borland_bmake.cpp 22 Sep 2005 12:57:34 -0000 1.1.1.14 +++ qmake/generators/win32/borland_bmake.cpp 30 Sep 2005 16:45:24 -0000 @@ -105,7 +105,7 @@ t << "LINK = " << var("QMAKE_LINK") << endl; t << "LFLAGS = "; if ( !project->variables()["QMAKE_LIBDIR"].isEmpty() ) - t << varGlue("QMAKE_LIBDIR","-L",";","") << " "; + t << varGlue("QMAKE_LIBDIR","-L\"",";","\"") << " "; t << var("QMAKE_LFLAGS") << endl; t << "LIBS = " << var("QMAKE_LIBS") << endl; } @@ -186,10 +186,14 @@ t << "\n\t" << "$(LINK) @&&|" << "\n\t" << "$(LFLAGS) $(OBJECTS) $(OBJMOC),$(TARGET),,$(LIBS),$(DEF_FILE),$(RES_FILE)"; } else { + // tlib.exe splits every parameter at " ", "+" and "-". Fix this by + // quoting. t << "\n\t-$(DEL_FILE) $(TARGET)" - << "\n\t" << "$(LIB) $(TARGET) @&&|" << " \n+" - << project->variables()["OBJECTS"].join(" \\\n+") << " \\\n+" - << project->variables()["OBJMOC"].join(" \\\n+"); + << "\n\t" << "$(LIB) \"$(TARGET)\" @&&|" << " \n"; + if(project->variables()["OBJECTS"].count() > 0) + t << "+\"" << project->variables()["OBJECTS"].join("\" \\\n+\"") << "\" \\\n"; + if(project->variables()["OBJMOC"].count() > 0) + t << "+\"" << project->variables()["OBJMOC"].join("\" \\\n+\"") << "\" \\\n"; } t << extraCompilerDeps; t << endl << "|" << endl; _________________________________________________________________________________________________________________________ * src/qt.pro _________________________________________________________________________________________________________________________ Set Version to '3' to get qt-mt3.dll instead of qt-mt333.dll Index: src/qt.pro =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/qt.pro,v retrieving revision 1.1.1.13 diff -u -r1.1.1.13 qt.pro --- src/qt.pro 29 Jan 2005 11:12:57 -0000 1.1.1.13 +++ src/qt.pro 30 Jan 2005 17:59:04 -0000 @@ -2,7 +2,7 @@ TEMPLATE = lib TARGET = qt embedded:TARGET = qte -VERSION = 3.3.4 +VERSION = 3 DESTDIR = $$QMAKE_LIBDIR_QT DLLDESTDIR = ../bin _________________________________________________________________________________________________________________________ * src/kernel/qapplication.cpp _________________________________________________________________________________________________________________________ GetModuleFileName: nSize - Size of the lpFilename buffer, in TCHARs. Index: src/kernel/qapplication.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qapplication.cpp,v retrieving revision 1.1.1.13 diff -u -r1.1.1.13 qapplication.cpp --- src/kernel/qapplication.cpp 29 Jan 2005 11:13:03 -0000 1.1.1.13 +++ src/kernel/qapplication.cpp 31 Jan 2005 19:16:58 -0000 @@ -1634,7 +1634,7 @@ QFileInfo filePath; QT_WA({ WCHAR module_name[256]; - GetModuleFileNameW(0, module_name, sizeof(module_name)); + GetModuleFileNameW(0, module_name, sizeof(module_name)/sizeof(WCHAR)); filePath = QString::fromUcs2((const unsigned short *)module_name); }, { char module_name[256]; _________________________________________________________________________________________________________________________ * examples/examples.pro _________________________________________________________________________________________________________________________ We don't have directory 'trayicon' :( Index: examples/examples.pro =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/examples/examples.pro,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 examples.pro --- examples/examples.pro 29 Jan 2005 11:12:47 -0000 1.1.1.6 +++ examples/examples.pro 30 Jan 2005 18:31:14 -0000 @@ -116,7 +116,7 @@ embedded:SUBDIRS -= showimg -win32:SUBDIRS += trayicon +#win32:SUBDIRS += trayicon embedded:SUBDIRS += trayicon x11:SUBDIRS += biff \ _________________________________________________________________________________________________________________________ * src/kernel/qprocess.cpp _________________________________________________________________________________________________________________________ QMemBuf contains an error resulting in segfaults using it with qprocess compiled with msvc.net This patch avoids using QMemBuf =================================================================== RCS file: /c/temp/kde-cygwin/qt-3/src/kernel/qprocess.cpp,v retrieving revision 1.1.1.11 retrieving revision 1.1.1.10 diff -u -3 -p -B -u -b -B -r1.1.1.11 -r1.1.1.10 --- src/kernel/qprocess.cpp 29 Jan 2005 11:13:04 -0000 1.1.1.11 +++ src/kernel/qprocess.cpp 23 Jan 2005 23:36:33 -0000 1.1.1.10 @@ -47,6 +47,7 @@ //#define QT_QPROCESS_DEBUG +#define AVOID_QMEMBUF_BUG /*! @@ -456,6 +457,17 @@ QByteArray QProcess::readStdout() if ( readStdoutCalled ) { return QByteArray(); } +// +// using QMembuf->readAll() results in a unknown segment violation in QMembuf::comsumeBytes() +// +#ifdef AVOID_QMEMBUF_BUG + readStdoutCalled = TRUE; + QByteArray *buf = (QByteArray *)membufStdout(); + readStdoutCalled = FALSE; + QByteArray a = *buf; + delete buf; + return a; +#else readStdoutCalled = TRUE; QMembuf *buf = membufStdout(); readStdoutCalled = FALSE; @@ -459,8 +471,8 @@ QByteArray QProcess::readStdout() readStdoutCalled = TRUE; QMembuf *buf = membufStdout(); readStdoutCalled = FALSE; - return buf->readAll(); +#endif } /*! @@ -478,11 +490,20 @@ QByteArray QProcess::readStderr() if ( readStderrCalled ) { return QByteArray(); } +#ifdef AVOID_QMEMBUF_BUG + readStderrCalled = TRUE; + QByteArray *buf = (QByteArray *)membufStderr(); + readStderrCalled = FALSE; + QByteArray a = *buf; + delete buf; + return a; +#else readStderrCalled = TRUE; QMembuf *buf = membufStderr(); readStderrCalled = FALSE; return buf->readAll(); +#endif } /*! @@ -499,6 +520,10 @@ QByteArray QProcess::readStderr() QString QProcess::readLineStdout() { QByteArray a( 256 ); +#ifdef AVOID_QMEMBUF_BUG + // FIXME: has to be implemented + return QString::null; +#else QMembuf *buf = membufStdout(); if ( !buf->scanNewline( &a ) ) { if ( !canReadLineStdout() ) @@ -519,6 +544,7 @@ QString QProcess::readLineStdout() a.at( size - 1 ) = '\0'; } return QString( a ); +#endif } /*! @@ -534,6 +560,10 @@ QString QProcess::readLineStdout() */ QString QProcess::readLineStderr() { +#ifdef AVOID_QMEMBUF_BUG + // FIXME: has to be implemented + return QString::null; +#else QByteArray a( 256 ); QMembuf *buf = membufStderr(); if ( !buf->scanNewline( &a ) ) { @@ -555,6 +585,7 @@ QString QProcess::readLineStderr() a.at( size - 1 ) = '\0'; } return QString( a ); +#endif } /*! _________________________________________________________________________________________________________________________ * src/kernel/qapplication.cpp _________________________________________________________________________________________________________________________ older cygwin ld releases does not have the runtime-pseudo-reloc, which allows referencing variables with offsets from a dll To prevent this the method QApplication::globalStrut() was exported as function rather as inlined code. This patch provides this feature for recent qt release to ensure, that this dll is usable with older application (otherwise a symbol is missing) Index: src/kernel/qapplication.cpp =================================================================== RCS file: /c/temp/kde-cygwin/qt-3/src/kernel/qapplication.cpp,v retrieving revision 1.1.1.13 retrieving revision 1.1.1.12 diff -u -3 -p -B -u -b -B -r1.1.1.13 -r1.1.1.12 --- src/kernel/qapplication.cpp 29 Jan 2005 11:13:03 -0000 1.1.1.13 +++ src/kernel/qapplication.cpp 4 Jan 2005 02:46:05 -0000 1.1.1.12 @@ -36,6 +36,9 @@ **********************************************************************/ #include "qobjectlist.h" +#ifdef Q_OS_CYGWIN +#define QT_NO_INLINE_GLOBALSTRUT +#endif #include "qapplication.h" #include "qeventloop.h" #include "qeventloop_p.h" @@ -1542,6 +1550,17 @@ void QApplication::setGlobalStrut( const app_strut = strut; } +// before cygwin qt release 3.3 release, the runtime pseudo relocation support (using vars from a dll with offset) +// wasn't present and inlining globalsStrut wasn't possible. Applications build with older qt releases expects this +// symbol, so we define it for compatibility. Please note, thas for compiling qt applications with this release +// globalStrut is inlined. +#ifdef QT_NO_INLINE_GLOBALSTRUT +QSize &QApplication::globalStrut() +{ + return app_strut; +} +#endif + #if defined( Q_WS_WIN ) || defined( Q_WS_MAC ) extern const char *qAppFileName(); #endif @@ -2882,6 +2901,8 @@ void QApplication::syncX() {} // do not */ #if defined(Q_OS_CYGWIN) +#include "qapplication_p.h" + Qt::WindowsVersion QApplication::winVersion() { return qt_winver; Index: src/kernel/qapplication.h =================================================================== RCS file: /c/temp/kde-cygwin/qt-3/src/kernel/qapplication.h,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.9 diff -u -3 -p -B -u -b -B -r1.1.1.10 -r1.1.1.9 --- src/kernel/qapplication.h 29 Jan 2005 11:13:03 -0000 1.1.1.10 +++ src/kernel/qapplication.h 4 Jan 2005 02:46:05 -0000 1.1.1.9 @@ -206,7 +206,11 @@ public: static int wheelScrollLines(); #endif static void setGlobalStrut( const QSize & ); +#ifdef QT_NO_INLINE_GLOBALSTRUT + static QSize &globalStrut(); +#else static QSize globalStrut(); +#endif #ifndef QT_NO_COMPONENT static void setLibraryPaths( const QStringList & ); @@ -482,10 +486,12 @@ inline QString QApplication::sessionKey( return session_key ? *session_key : QString::null; } #endif +#ifndef QT_NO_INLINE_GLOBALSTRUT inline QSize QApplication::globalStrut() { return app_strut; } +#endif inline bool QApplication::sendEvent( QObject *receiver, QEvent *event ) { if ( event ) event->spont = FALSE; return qApp ? qApp->notify( receiver, event ) : FALSE; } __________________________________________________________________________________________________________________ _______ initial support for cygwin/win32 __________________________________________________________________________________________________________________ _______ Index: qt.pro =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/qt.pro,v retrieving revision 1.1.1.15 diff -u -3 -p -B -r1.1.1.15 qt.pro --- src/qt.pro 12 Feb 2005 00:17:08 -0000 1.1.1.15 +++ src/qt.pro 15 Feb 2005 22:41:53 -0000 @@ -100,7 +100,7 @@ unix { WORKSPACE_H = $$WORKSPACE_CPP XML_H = $$XML_CPP STYLES_H = $$STYLES_CPP - !embedded:!mac:CONFIG += x11 x11inc + !embedded:!mac:!win32:CONFIG += x11 x11inc } aix-g++ { Index: dialogs/qfiledialog.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/dialogs/qfiledialog.cpp,v retrieving revision 1.1.1.13 diff -u -3 -p -B -r1.1.1.13 qfiledialog.cpp --- src/dialogs/qfiledialog.cpp 22 Sep 2005 12:53:56 -0000 1.1.1.21 +++ src/dialogs/qfiledialog.cpp 30 Sep 2005 16:45:24 -0000 @@ -113,6 +113,20 @@ #undef check #endif +#if defined(Q_OS_CYGWIN) && defined(QT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) +int getlogin_r (char* name, size_t namesize ) +{ + char *s = getlogin(); + if (s) { + strncpy (name, s, namesize); + return 0; + } + else { + return -1; + } +} +#endif + /* XPM */ static const char * const start_xpm[]={ "16 15 8 1", @@ -5708,6 +5722,9 @@ { return d->url; } +#if defined(Q_CYGWIN_WIN) +Q_EXPORT int qt_ntfs_permission_lookup = 0; +#endif static bool isRoot( const QUrl &u ) { Index: kernel/qapplication.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qapplication.cpp,v retrieving revision 1.1.1.15 diff -u -3 -p -B -r1.1.1.15 qapplication.cpp --- src/kernel/qapplication.cpp 12 Feb 2005 00:17:22 -0000 1.1.1.15 +++ src/kernel/qapplication.cpp 15 Feb 2005 22:42:15 -0000 @@ -2895,7 +2895,7 @@ void QApplication::syncX() {} // do not of Qt only. */ -#if defined(Q_OS_CYGWIN) +#if defined(Q_OS_CYGWIN) && !defined(Q_CYGWIN_WIN) #include "qapplication_p.h" Qt::WindowsVersion QApplication::winVersion() Index: kernel/qclipboard.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qclipboard.cpp,v retrieving revision 1.1.1.9 diff -u -3 -p -B -r1.1.1.9 qclipboard.cpp --- src/kernel/qclipboard.cpp 22 Sep 2005 12:55:16 -0000 1.1.1.13 +++ src/kernel/qclipboard.cpp 30 Sep 2005 16:45:26 -0000 @@ -154,7 +154,7 @@ // nothing } -#ifndef Q_WS_WIN32 +#if !defined(Q_WS_WIN) /*! \internal Index: kernel/qeventloop_p.h =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qeventloop_p.h,v retrieving revision 1.1.1.8 diff -u -3 -p -B -r1.1.1.8 qeventloop_p.h --- src/kernel/qeventloop_p.h 29 Jan 2005 11:13:03 -0000 1.1.1.8 +++ src/kernel/qeventloop_p.h 15 Feb 2005 22:42:33 -0000 @@ -85,7 +85,7 @@ public: }; #endif // Q_OS_UNIX -#if defined(Q_WS_WIN) +#if defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN) struct QSockNot { QSocketNotifier *obj; int fd; @@ -134,7 +134,7 @@ public: QSockNotType sn_vec[3]; #endif -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN) // pending socket notifiers list QPtrList sn_pending_list; #endif // Q_WS_WIN Index: kernel/qt_kernel.pri =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qt_kernel.pri,v retrieving revision 1.1.1.7 diff -u -3 -p -B -r1.1.1.7 qt_kernel.pri --- src/kernel/qt_kernel.pri 29 Jan 2005 11:13:05 -0000 1.1.1.7 +++ src/kernel/qt_kernel.pri 15 Feb 2005 22:42:46 -0000 @@ -111,16 +111,18 @@ kernel { $$KERNEL_CPP/qmime_win.cpp \ $$KERNEL_CPP/qpixmap_win.cpp \ $$KERNEL_CPP/qprinter_win.cpp \ - $$KERNEL_CPP/qprocess_win.cpp \ $$KERNEL_CPP/qpaintdevice_win.cpp \ $$KERNEL_CPP/qpainter_win.cpp \ $$KERNEL_CPP/qregion_win.cpp \ $$KERNEL_CPP/qsound_win.cpp \ - $$KERNEL_CPP/qthread_win.cpp \ $$KERNEL_CPP/qwidget_win.cpp \ $$KERNEL_CPP/qole_win.c \ $$KERNEL_CPP/qfontengine_win.cpp + win32:!unix:SOURCES += $$KERNEL_CPP/qprocess_win.cpp \ + $$KERNEL_CPP/qthread_win.cpp + + unix:x11 { SOURCES += $$KERNEL_CPP/qapplication_x11.cpp \ $$KERNEL_CPP/qclipboard_x11.cpp \ @@ -164,11 +166,12 @@ kernel { $$KERNEL_CPP/qfont_mac.cpp \ $$KERNEL_CPP/qfontengine_mac.cpp DEFINES += QMAC_ONE_PIXEL_LOCK - } else:unix { + } else:unix:!win32 { SOURCES += $$KERNEL_CPP/qprinter_unix.cpp \ $$KERNEL_CPP/qpsprinter.cpp \ $$KERNEL_CPP/qeventloop_unix.cpp } + unix:SOURCES += $$KERNEL_CPP/qprocess_unix.cpp \ $$KERNEL_CPP/qthread_unix.cpp Index: network/qt_network.pri =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/network/qt_network.pri,v retrieving revision 1.1.1.6 diff -u -3 -p -B -r1.1.1.6 qt_network.pri --- src/network/qt_network.pri 12 Feb 2005 00:17:53 -0000 1.1.1.6 +++ src/network/qt_network.pri 15 Feb 2005 22:42:56 -0000 @@ -19,6 +19,6 @@ network { $$NETWORK_CPP/qsocket.cpp \ $$NETWORK_CPP/qsocketdevice.cpp unix:NETWORK_SOURCES += $$NETWORK_CPP/qsocketdevice_unix.cpp - win32:NETWORK_SOURCES += $$NETWORK_CPP/qsocketdevice_win.cpp + win32:!unix:NETWORK_SOURCES += $$NETWORK_CPP/qsocketdevice_win.cpp SOURCES += $$NETWORK_SOURCES } Index: tools/qglobal.h =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/tools/qglobal.h,v retrieving revision 1.1.1.12 diff -u -3 -p -B -r1.1.1.12 qglobal.h --- src/tools/qglobal.h 12 Feb 2005 00:18:01 -0000 1.1.1.12 +++ src/tools/qglobal.h 15 Feb 2005 22:43:33 -0000 @@ -564,6 +564,8 @@ # define QT_NO_QWS_IM # elif defined(Q_OS_MACX) # define Q_WS_MACX +# elif defined(Q_CYGWIN_WIN) +# define Q_WS_WIN # else # define Q_WS_X11 # endif Index: tools/qt_tools.pri =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/tools/qt_tools.pri,v retrieving revision 1.1.1.4 diff -u -3 -p -B -r1.1.1.4 qt_tools.pri --- src/tools/qt_tools.pri 27 Aug 2004 21:08:17 -0000 1.1.1.4 +++ src/tools/qt_tools.pri 15 Feb 2005 22:43:33 -0000 @@ -69,7 +69,7 @@ tools { $$TOOLS_P/qucom_p.h \ $$TOOLS_H/quuid.h - win32:SOURCES += $$TOOLS_CPP/qdir_win.cpp \ + win32:!unix:SOURCES += $$TOOLS_CPP/qdir_win.cpp \ $$TOOLS_CPP/qfile_win.cpp \ $$TOOLS_CPP/qfileinfo_win.cpp \ $$TOOLS_CPP/qlibrary_win.cpp \ @@ -79,6 +79,9 @@ tools { $$TOOLS_CPP/qthreadstorage_win.cpp \ $$TOOLS_CPP/qcriticalsection_p.cpp + win32:unix:SOURCES += $$TOOLS_CPP/qsettings_win.cpp \ + $$TOOLS_CPP/qcriticalsection_p.cpp + win32-borland:SOURCES += $$TOOLS_CPP/qwinexport.cpp wince-* { Index: tools/qlibrary_p.h =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/tools/qlibrary_p.h,v retrieving revision 1.1.1.7 diff -u -3 -p -B -r1.1.1.7 qlibrary_p.h --- src/tools/qlibrary_p.h 29 Jan 2005 11:13:10 -0000 1.1.1.7 +++ src/tools/qlibrary_p.h 15 Feb 2005 22:53:01 -0000 @@ -63,7 +63,7 @@ class QLibraryPrivate public: QLibraryPrivate( QLibrary *lib ); -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN32 HINSTANCE pHnd; #else void *pHnd; Index: configure =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/configure,v retrieving revision 1.1.1.11 diff -u -3 -p -B -u -b -B -r1.1.1.11 configure --- configure 12 Feb 2005 00:16:56 -0000 1.1.1.11 +++ configure 24 Feb 2005 20:31:41 -0000 @@ -49,6 +49,7 @@ PLATFORM_X11=no PLATFORM_MAC=no PLATFORM_QWS=no PLATFORM_QNX=no +PLATFORM_WIN=no if [ -f $relpath/src/kernel/qapplication_mac.cpp ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then # Qt/Mac @@ -67,9 +68,12 @@ elif [ -f $relpath/src/kernel/qapplicati else PLATFORM_QWS=maybe fi +elif [ -f $relpath/src/kernel/qapplication_win.cpp ]; then + # Qt/Win + # ~ src/kernel/qapplication_win.cpp is present + PLATFORM_WIN=maybe fi - #------------------------------------------------------------------------------- # check commercial license #------------------------------------------------------------------------------- @@ -79,6 +83,7 @@ fi if [ -f $relpath/LICENSE.QPL -o -f $relpath/LICENSE.GPL ]; then [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes + [ "$PLATFORM_WIN" = "maybe" ] && PLATFORM_WIN=yes Edition="free" Licensee="Free" Products="qt-free" @@ -566,6 +571,9 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + win32) + PLATFORM_WIN=yes + ;; profile) if [ "$VAL" = "yes" ]; then CFG_PROFILE=yes @@ -1448,7 +1456,11 @@ if [ -z "$PLATFORM" ]; then " ;; CYGWIN*:*) + if [ "$PLATFORM_WIN" = "yes" ] ; then + PLATFORM=cygwin-g++-win32 + else PLATFORM=cygwin-g++ + fi ;; LynxOS*:*) PLATFORM=lynxos-g++ @@ -2338,6 +2350,14 @@ if [ "$Edition" = "free" ]; then echo echo "Type 'Q' to view the Q Public License." affix="either" + elif [ "$PLATFORM_WIN" = "yes" ]; then + echo + echo "This is the Qt/Win Free Edition." + echo + echo "You are licensed to use this software under the terms of" + echo "the GNU General Public License (GPL)." + echo + affix="the" else echo echo "Internal error." All files from mkspecs/cygwin-g++-win32/ _________________________________________________________________________________________________________________________ * src/moc/moc_lex.cpp _________________________________________________________________________________________________________________________ unistd.h isn't available in win32, so don't include it there. Index: src/moc/moc_lex.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/moc/moc_lex.cpp,v retrieving revision 1.1.1.14 diff -u -r1.1.1.14 moc_lex.cpp --- src/moc/moc_lex.cpp 9 Apr 2005 11:10:14 -0000 1.1.1.14 +++ src/moc/moc_lex.cpp 9 Apr 2005 15:32:36 -0000 @@ -1046,7 +1046,7 @@ #define IN_PROPERTY 12 #define IN_CLASSINFO 13 -#ifndef YY_NO_UNISTD_H +#if !defined (YY_NO_UNISTD_H) && !defined(Q_OS_WIN32) /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. _________________________________________________________________________________________________________________________ * src/tools/qstring.h and qmemarray.h _________________________________________________________________________________________________________________________ add operator[] (uint) to avoid msvc compiler errors see http://wiki.kde.org/tiki-index.php?page=Installing+KDElibs%2Fwin32#id926330 --- qstring.h.orig Fri Sep 17 11:49:26 2004 +++ qstring.h Fri Sep 17 13:51:46 2004 @@ -637,8 +637,10 @@ QChar at( uint i ) const { return i < d->len ? d->unicode[i] : QChar::null; } QChar operator[]( int i ) const { return at((uint)i); } + QChar operator[]( uint i ) const { return at((uint)i); } QCharRef at( uint i ); QCharRef operator[]( int i ); + QCharRef operator[]( uint i ); QChar constref(uint i) const { return at(i); } @@ -808,6 +810,7 @@ inline QCharRef QString::at( uint i ) { return QCharRef(this,i); } inline QCharRef QString::operator[]( int i ) { return at((uint)i); } +inline QCharRef QString::operator[]( uint i ) { return at(i); } class Q_EXPORT QConstString : private QString { --- qmemarray.h.orig Fri Sep 17 13:49:56 2004 +++ qmemarray.h Fri Sep 17 14:35:02 2004 @@ -96,6 +96,8 @@ int bsearch( const type &d ) const { return QGArray::bsearch((const char*)&d,sizeof(type)); } // ### Qt 4.0: maybe provide uint overload as work-around for MSVC bug + type& operator[]( uint i ) const + { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } type& operator[]( int i ) const { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } type& at( uint i ) const