<div dir="ltr"><div>I am suggesting a number of fixes to Calligra. They are meant to address problems in its Windows builds as shown in the last entry here:<br><a href="http://www.winkde.org/pub/kde/ports/win32/dashboard/release/" target="_blank">http://www.winkde.org/pub/kde/ports/win32/dashboard/release/</a><br><br>Some of the fixes might also be helpful for non-Windows builds.<br><br>As an aside, the Calligra version used in the build at <a href="http://winkde.org" target="_blank">winkde.org</a>
is 2.7.90 (2.8 beta). It appears that the problems shown in the build
are still there in the most recent Calligra version. But it would be nice
if <a href="http://winkde.org" target="_blank">winkde.org</a> would move to Calligra version 2.8.6, or 2.9 when available.<br><br>My
suggested fixes are shown below. I am unsure if the rich text
formatting will show on this posting to the mailing list. So I have also
put a rich text version on my website. The formatting makes it easier to understand:<br><a href="http://tinyurl.com/sleibowitz/SL_Fixes_141020.rtf" target="_blank">tinyurl.com/sleibowitz/SL_Fixes_141020.rtf</a><div><div><img src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div><span><font color="#888888">Stephen Leibowitz<br>__</font></span><span style="color:rgb(136,136,136)">_</span><span style="color:rgb(136,136,136)">_</span><span style="color:rgb(136,136,136)">____________________________</span><span style="color:rgb(136,136,136)">____</span></div><div><span><font color="#888888"><br></font></span></div><div>The Build Overview at:<br></div><div><div><a href="http://www.winkde.org/pub/kde/ports/win32/dashboard/release/" target="_blank">http://www.winkde.org/pub/kde/ports/win32/dashboard/release/</a></div><div><br></div><div>shows that the mingw-w32 and mingw-w64 builds of Calligra 2.7.90 failed. The detail for mingw-w64 is here:</div><div><a href="http://winkde.org/pub/kde/ports/win32/repository-4.12/logs/log-mingw-w64-kdeapps_calligra.txt" target="_blank">http://winkde.org/pub/kde/ports/win32/repository-4.12/logs/log-mingw-w64-kdeapps_calligra.txt</a></div><div><br></div><div><i>This is a section of that build log:</i></div><div><br></div><div>In file included from sqlscanner.cpp:644:0:</div><div>h:/build/kdeapps/calligra-20120805/work/calligra-2.7.90/winquirks/unistd.h:119:13: error: conflicting declaration 'typedef int mode_t'</div><div><br></div><div> typedef int mode_t;</div><div> ^</div><div><br></div><div>In file included from H:/include/mingw/sys/types.h:23:0,</div><div> from H:/include/mingw/stdio.h:29,</div><div> from sqlscanner.cpp:20:</div><div>h:\mingw64\x86_64-w64-mingw32\include\sys\types.h:77:17: error: 'mode_t' has a previous declaration as 'typedef _mode_t mode_t'</div><div><br></div><div> typedef _mode_t mode_t;</div><div> ^</div><div>***</div><div><br></div><div><i>The following code segment is from:</i></div><div><a href="https://openmodelica.org/svn/OpenModelicaExternal/trunk/tools/windows/OMDev/tools/mingw64/x86_64-w64-mingw32/include/sys/types.h" target="_blank">https://openmodelica.org/svn/OpenModelicaExternal/trunk/tools/windows/OMDev/tools/mingw64/x86_64-w64-mingw32/include/sys/types.h</a></div><div><br></div><div>#ifndef _MODE_T_</div><div>#define _MODE_T_</div><div>typedef unsigned short _mode_t;</div><div><br></div><div>#ifndef NO_OLDNAMES</div><div>typedef _mode_t mode_t;</div><div>#endif</div><div>#endif /* Not _MODE_T_ */</div><div><br></div><div>***</div><div><br></div><div><i>Here is a segment in calligra-2.8.5\winquirks\unistd.h:</i></div><div>#ifndef _MODE_T_</div><div>#define _MODE_T_</div><div>typedef int mode_t;</div><div>#endif</div><div><br></div><div><i>I suggest changing the typedef in unistd.h <font color="#ff0000">(CHANGE 1):</font></i></div><div>#ifndef _MODE_T_</div><div>#define _MODE_T_</div><div>typedef unsigned short mode_t;</div><div>#endif</div><div><br></div><div>****************************</div><div><br></div><div><i>The Calligra 2.7.90 build log using mingw-w64 mentioned above also gives this error message:</i></div><div><br></div><div>In file included from sqlscanner.cpp:644:0:</div><div>h:/build/kdeapps/calligra-20120805/work/calligra-2.7.90/winquirks/unistd.h:124:13: error: conflicting declaration 'typedef int pid_t'</div><div><br></div><div> typedef int pid_t;</div><div> ^</div><div><br></div><div>In file included from H:/include/mingw/sys/types.h:23:0,</div><div> from H:/include/mingw/stdio.h:29,</div><div> from sqlscanner.cpp:20:</div><div>h:\mingw64\x86_64-w64-mingw32\include\sys\types.h:68:16: error: 'pid_t' has a previous declaration as 'typedef _pid_t pid_t'</div><div><br></div><div> typedef _pid_t pid_t;</div><div> ^</div><div>***</div><div><br></div><div><i>The following code segment is from:</i></div><div><a href="https://openmodelica.org/svn/OpenModelicaExternal/trunk/tools/windows/OMDev/tools/mingw64/x86_64-w64-mingw32/include/sys/types.h" target="_blank">https://openmodelica.org/svn/OpenModelicaExternal/trunk/tools/windows/OMDev/tools/mingw64/x86_64-w64-mingw32/include/sys/types.h</a></div><div>#ifndef _PID_T_</div><div>#define _PID_T_</div><div>#ifndef _WIN64</div><div>typedef int _pid_t;</div><div>#else</div><div>__MINGW_EXTENSION</div><div>typedef __int64 _pid_t;</div><div>#endif</div><div><br></div><div>#ifndef NO_OLDNAMES</div><div>#undef pid_t</div><div>typedef _pid_t pid_t;</div><div>#endif</div><div>#endif /* Not _PID_T_ */</div><div><br></div><div>***</div><div><br></div><div><i>Here is a segment in calligra-2.8.5\winquirks\unistd.h:</i></div><div>#ifndef pid_t</div><div>typedef int pid_t;</div><div>#endif</div><div><br></div><div><i>I suggest replacing the 3-line unistd.h segment with <font color="#ff0000">(CHANGE 2):</font></i></div><div>#ifndef pid_t</div><div>#ifndef _WIN64</div><div>typedef int pid_t;</div><div>#else</div><div>typedef __int64 pid_t;</div><div>#endif</div><div>#endif</div><div><br></div><div>****************************</div><div><br></div><div><i>Here is line 116 of calligra-2.8.5\winquirks\unistd.h</i></div><div>#if _MSC_VER < 1600</div><div><i>I suggest replacing it with <font color="#ff0000">(CHANGE 3):</font></i></div><div>#if defined(_MSC_VER) && _MSC_VER < 1600</div><div><br></div><div><br></div><div><i>Here is line 184 of calligra-2.8.5\3rdparty\kdgantt\kdganttglobal.h</i></div><div>#if _MSC_VER >= 1300</div><div><i>I suggest replacing it with <font color="#ff0000">(CHANGE 4):</font></i></div><div>#if defined(_MSC_VER) && _MSC_VER >= 1300</div><div><br></div><div>****************************</div><div><br></div><div>The Calligra 2.7.90 build log using msvc2010 is at:</div><div><a href="http://winkde.org/pub/kde/ports/win32/repository-4.12/logs/log-msvc2010-kdeapps_calligra.txt" target="_blank">http://winkde.org/pub/kde/ports/win32/repository-4.12/logs/log-msvc2010-kdeapps_calligra.txt</a></div><div><br></div><div>In two places it gives this warning concerning sqlscanner.cpp:</div><div>warning C4003: not enough actual parameters for macro 'yywrap'</div><div><br></div><div><i>Here is line 344 of calligra-2.8.5\libs\db\parser\sqlscanner.cpp</i></div><div>#define yywrap(n) 1</div><div><i>I suggest replacing it with <font color="#ff0000">(CHANGE 5):</font></i></div><div>#define yywrap() 1</div><div><br></div><div>****************************</div><div><br></div><div>The Calligra 2.7.90 build log using msvc2010 gives this warning concerning msghandler.cpp:</div><div>'KexiDB::MessageHandler::askQuestion' : recursive on all control paths, function will cause runtime stack overflow</div><div><br></div><div><i>Here are lines 81 and 82 of calligra-2.8.5\libs\db\msghandler.cpp</i></div><div> return askQuestion(message, dlgType, defaultResult, buttonYes,</div><div> buttonNo, dontShowAskAgainName, options);</div><div><i>I suggest using this function instead <font color="#ff0000">(CHANGE 6):</font></i></div><div> return askQuestionInternal(message, dlgType, defaultResult, buttonYes,</div><div> buttonNo, dontShowAskAgainName, options);</div><div><br></div><div>****************************</div><div><br></div><div>The Calligra 2.7.90 build log using msvc2010 gives this warning concerning taskworkpackageview.cpp:</div><div>'*/' found outside of comment</div><div><br></div><div><i>Here is line 187 of calligra-2.8.5\plan\workpackage\taskworkpackageview.cpp</i></div><div>void TaskWorkPackageTreeView::dragMoveEvent(QDragMoveEvent */*event*/)</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 7):</font></i></div><div>void TaskWorkPackageTreeView::dragMoveEvent(QDragMoveEvent *event)</div><div><br></div><div>****************************</div><div><br></div><div>The Calligra 2.7.90 build log using msvc2010 gives this warning in 5 places concerning taskworkpackagemodel.cpp:</div><div>'*/' found outside of comment</div><div><br></div><div><i>Here is line 98 of calligra-2.8.5\plan\workpackage\taskworkpackagemodel.cpp</i></div><div>void TaskWorkPackageModel::slotNodeInserted( Node */*node*/ )</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 8):</font></i></div><div>void TaskWorkPackageModel::slotNodeInserted( Node *node )</div><div><br></div><div><i>Here is line 111 of calligra-2.8.5\plan\workpackage\taskworkpackagemodel.cpp</i></div><div>void TaskWorkPackageModel::slotNodeRemoved( Node */*node*/ )</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 9):</font></i></div><div>void TaskWorkPackageModel::slotNodeRemoved( Node *node )</div><div><br></div><div><i>Here is line 127 of calligra-2.8.5\plan\workpackage\taskworkpackagemodel.cpp</i></div><div>void TaskWorkPackageModel::slotDocumentAdded( Node *node, Document */*doc*/, int row )</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 10):</font></i></div><div>void TaskWorkPackageModel::slotDocumentAdded( Node *node, Document *doc, int row )</div><div><br></div><div><i>Here is line 136 of calligra-2.8.5\plan\workpackage\taskworkpackagemodel.cpp</i></div><div>void TaskWorkPackageModel::slotDocumentRemoved( Node *node, Document */*doc*/, int row )</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 11):</font></i></div><div>void TaskWorkPackageModel::slotDocumentRemoved( Node *node, Document *doc, int row )</div><div><br></div><div><i>Here is line 145 of calligra-2.8.5\plan\workpackage\taskworkpackagemodel.cpp</i></div><div>void TaskWorkPackageModel::slotDocumentChanged( Node *node, Document */*doc*/, int row )</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 12):</font></i></div><div>void TaskWorkPackageModel::slotDocumentChanged( Node *node, Document *doc, int row )</div><div><br></div><div>****************************</div><div><br></div><div>The Calligra 2.7.90 build log using msvc2010 gives this warning in 2 places concerning workpackage.cpp:</div><div>'*/' found outside of comment</div><div><br></div><div><i>Here is line 109 of calligra-2.8.5\plan\workpackage\workpackage.cpp</i></div><div>bool WorkPackage::addChild( Part */*part*/, const Document *doc )</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 13):</font></i></div><div>bool WorkPackage::addChild( Part *part, const Document *doc )</div><div><br></div><div><i>Here is line 300 of calligra-2.8.5\plan\workpackage\workpackage.cpp</i></div><div>bool WorkPackage::saveNativeFormat( Part */*part*/, const QString &path )</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 14):</font></i></div><div>bool WorkPackage::saveNativeFormat( Part *part, const QString &path )</div><div><br></div><div>****************************</div><div>The Calligra 2.7.90 build log using msvc2010 gives this warning concerning part.cpp:</div><div>'*/' found outside of comment</div><div><br></div><div><i>Here is line 828 of calligra-2.8.5\plan\workpackage\part.cpp</i></div><div>bool Part::completeSaving( KoStore */*store*/ )</div><div><i>I suggest removing the comment <font color="#ff0000">(CHANGE 15):</font></i></div><div>bool Part::completeSaving( KoStore *store )</div><div><br></div><div>****************************</div><div><br></div><div><i>Here is a section of calligra-2.8.5\winquirks\unistd.h starting at line 165:</i></div><div><br></div><div>#ifdef __cplusplus</div><div>extern "C" {</div><div>#endif</div><div><br></div><div>#if 0</div><div>int setenv(const char *name, const char *value, int overwrite);</div><div>int unsetenv (const char *name);</div><div>#endif</div><div>#ifdef __cplusplus</div><div>}</div><div>#endif</div><div><br></div><div><i>For clarity, I suggest replacing it with <font color="#ff0000">(CHANGE 16):</font></i></div><div><br></div><div>#ifdef __cplusplus</div><div>extern "C" {</div><div><br></div><div>#if 0</div><div>int setenv(const char *name, const char *value, int overwrite);</div><div>int unsetenv (const char *name);</div><div>#endif</div><div><br></div><div>}</div><div>#endif /* __cplusplus */</div><div><br></div><div>****************************</div></div><div><br></div><div><br></div></div>