Patches to 3.2.3 for HP-UX 11.23/IA, SGI C++ compiler
Albert Chin
kdevelop-devel at mlists.thewrittenword.com
Mon Jan 23 07:06:06 UTC 2006
The attached patches are required to get kdevelop-3.2.3 compiled with
the HP-UX 11.23/IA-64 and SGI C++ compiler.
1. [languages/cpp/pcsimporter/kdelibsimporter/settingsdialog.cpp]
::getenv -> getenv and add "using namespace std;".
languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp uses
"getenv" instead of "::getenv".
2. [languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp]
Uses getenv so add "using namespace std;".
3. [lib/antlr/antlr/config.hpp]
Add entries for HP-UX 11.23/IA compiler.
4. [parts/classview/digraphview.cpp]
Need cast on float arg to select correct overloaded version of sqrt.
5. [parts/tools/tools_part.cpp, languages/bash/bashsupport_part.cpp,
languages/perl/perlparser.cpp, languages/perl/perlsupportpart.cpp,
languages/python/pythonsupportpart.cpp,
languages/ruby/rubysupport_part.cpp]
QString::QString -> QString.
6. [lib/widgets/kdevhtmlpart.h]
Not needed as #include <khtml_part.h> brings in <kparts/part.h>
which has the class definition for ReadOnlyPart. And, while it
doesn't break the HP, SGI compilers, it does break the AIX C++
compiler.
7. [lib/antlr/antlr/ASTFactory.hpp, lib/antlr/antlr/CharBuffer.hpp,
lib/antlr/antlr/ANTLRUtil.hpp]
Need #include <iostream> for istream use.
8. [languages/ruby/debugger/rdbcontroller.cpp]
Need kde_socklen_t for correct socklen_t type under C++.
9. [buildtools/qmake/trollprojectwidget.cpp]
Inside the for loop, you've already defined the "it" variable so
neither of these compilers allow you to redefine it. Change
second usage of "it" to "it1".
10. [languages/cpp/debugger/framestackwidget.cpp]
strchr() returns a const on these platforms.
--
albert chin (china at thewrittenword.com)
-------------- next part --------------
--- languages/cpp/pcsimporter/kdelibsimporter/settingsdialog.cpp.orig 2006-01-20 12:47:51.079909000 -0600
+++ languages/cpp/pcsimporter/kdelibsimporter/settingsdialog.cpp 2006-01-20 16:20:46.740999000 -0600
@@ -16,6 +16,7 @@
#include <qdir.h>
#include <qregexp.h>
#include <cstdlib>
+using namespace std;
#if QT_VERSION < 0x030100
/* original source from qt-3.2.1/src/widgets/qlistbox.cpp
@@ -42,7 +43,7 @@
: SettingsDialogBase(parent,name,fl)
{
// Parse $KDEDIRS first, because it takes precedence over $KDEDIR
- QStringList kdedirs = QStringList::split( ':', QFile::decodeName( ::getenv( "KDEDIRS" ) ) );
+ QStringList kdedirs = QStringList::split( ':', QFile::decodeName( getenv( "KDEDIRS" ) ) );
for( QStringList::Iterator it = kdedirs.begin(); it != kdedirs.end(); ++it )
if ( !( *it ).isEmpty() )
*it += "/include";
Index: languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp
===================================================================
--- languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp.orig 2006-01-20 12:47:51.104082000 -0600
+++ languages/cpp/pcsimporter/qtimporter/settingsdialog.cpp 2006-01-20 16:15:00.673858000 -0600
@@ -16,6 +16,7 @@
#include <qdir.h>
#include <qregexp.h>
#include <cstdlib>
+using namespace std;
#if QT_VERSION < 0x030100
/* original source from qt-3.2.1/src/widgets/qlistbox.cpp
Index: lib/antlr/antlr/config.hpp
===================================================================
--- lib/antlr/antlr/config.hpp.orig 2006-01-20 12:14:27.353771000 -0600
+++ lib/antlr/antlr/config.hpp 2006-01-20 16:17:19.539916000 -0600
@@ -171,6 +168,16 @@
#endif // End of Metrowerks Codewarrior
/*}}}*/
/*****************************************************************************/
+/*{{{ HP C++ compiler
+ *****************************************************************************/
+#ifdef __HP_aCC
+# define HAS_NOT_CCTYPE_H
+# define HAS_NOT_CSTRING_H
+# define HAS_NOT_CSTDIO_H
+# undef ANTLR_CCTYPE_NEEDS_STD
+#endif // End HP-UX C++
+/*}}}*/
+/*****************************************************************************/
/*{{{ SGI Irix 6.5.10 MIPSPro compiler
*****************************************************************************/
// (contributed by Anna Winkler)
Index: parts/classview/digraphview.cpp
===================================================================
--- parts/classview/digraphview.cpp.orig 2005-10-05 08:32:24.000000000 -0500
+++ parts/classview/digraphview.cpp 2006-01-20 15:37:40.426775000 -0600
@@ -289,7 +289,7 @@
QPoint p1 = (*it2)->points[n-2];
QPoint p2 = (*it2)->points[n-1];
QPoint d = p1-p2;
- double l = sqrt(d.x()*d.x()+d.y()*d.y());
+ double l = sqrt((float)d.x()*d.x()+d.y()*d.y());
double d11 = (10.0)/l*d.x();
double d12 = (10.0)/l*d.y();
double d21 = -(3.0/l)*d.y();
Index: parts/tools/tools_part.cpp
===================================================================
--- parts/tools/tools_part.cpp.orig 2005-10-05 08:32:23.000000000 -0500
+++ parts/tools/tools_part.cpp 2006-01-20 15:44:57.313807000 -0600
@@ -180,7 +180,7 @@
if (captured)
{
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), cmdline, false);
+ appFrontend->startAppCommand(QString(), cmdline, false);
}
else
{
Index: lib/widgets/kdevhtmlpart.h
===================================================================
--- lib/widgets/kdevhtmlpart.h.orig 2006-01-23 00:01:56.689516000 -0600
+++ lib/widgets/kdevhtmlpart.h 2006-01-23 00:03:16.027045000 -0600
@@ -14,7 +14,6 @@
class KAction;
class KToolBarPopupAction;
-class KParts::ReadOnlyPart;
struct DocumentationHistoryEntry {
KURL url;
Index: lib/antlr/antlr/ASTFactory.hpp
===================================================================
--- lib/antlr/antlr/ASTFactory.hpp.orig 2006-01-20 15:57:17.107275000 -0600
+++ lib/antlr/antlr/ASTFactory.hpp 2006-01-20 15:57:26.378098000 -0600
@@ -12,6 +12,7 @@
#include <antlr/ASTArray.hpp>
#include <antlr/ASTPair.hpp>
+#include <iostream>
#include <utility>
#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
Index: lib/antlr/antlr/CharBuffer.hpp
===================================================================
--- lib/antlr/antlr/CharBuffer.hpp.orig 2005-10-05 08:32:42.000000000 -0500
+++ lib/antlr/antlr/CharBuffer.hpp 2006-01-20 15:57:42.578404000 -0600
@@ -10,6 +10,8 @@
#include <antlr/config.hpp>
#include <antlr/InputBuffer.hpp>
+#include <iostream>
+
#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
namespace antlr {
#endif
Index: languages/bash/bashsupport_part.cpp
===================================================================
--- languages/bash/bashsupport_part.cpp.orig 2005-10-05 08:33:34.000000000 -0500
+++ languages/bash/bashsupport_part.cpp 2006-01-20 15:58:51.030696000 -0600
@@ -183,7 +183,7 @@
{
kdDebug() << "starting application" << program << endl;
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), program, TRUE);
+ appFrontend->startAppCommand(QString(), program, TRUE);
}
Index: lib/antlr/antlr/ANTLRUtil.hpp
===================================================================
--- lib/antlr/antlr/ANTLRUtil.hpp.orig 2005-10-05 08:32:42.000000000 -0500
+++ lib/antlr/antlr/ANTLRUtil.hpp 2006-01-20 15:58:08.407573000 -0600
@@ -9,6 +9,8 @@
#include <antlr/config.hpp>
+#include <iostream>
+
#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
namespace antlr {
#endif
Index: languages/ruby/debugger/rdbcontroller.cpp
===================================================================
--- languages/ruby/debugger/rdbcontroller.cpp.orig 2005-10-05 08:33:08.000000000 -0500
+++ languages/ruby/debugger/rdbcontroller.cpp 2006-01-20 16:16:00.664367000 -0600
@@ -21,6 +21,10 @@
// * *
// **************************************************************************
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "rdbcontroller.h"
#include <sys/types.h>
@@ -1172,7 +1176,7 @@
Q_ASSERT(masterSocket == masterSocket_);
struct sockaddr sockaddr;
- socklen_t fromlen;
+ kde_socklen_t fromlen;
if (socketNotifier_ != 0) {
close(socket_);
Index: languages/perl/perlparser.cpp
===================================================================
--- languages/perl/perlparser.cpp.orig 2005-10-05 08:33:31.000000000 -0500
+++ languages/perl/perlparser.cpp 2006-01-20 16:32:42.502299000 -0600
@@ -464,7 +464,7 @@
return;
}
array.setRawData(buffer, n);
- result=QString::QString(array);
+ result=QString(array);
array.resetRawData(buffer, n);
}
pclose(fd);
Index: languages/perl/perlsupportpart.cpp
===================================================================
--- languages/perl/perlsupportpart.cpp.orig 2005-10-05 08:33:31.000000000 -0500
+++ languages/perl/perlsupportpart.cpp 2006-01-20 16:33:52.272526000 -0600
@@ -194,7 +194,7 @@
{
bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevperlsupport/run/terminal");
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), program, inTerminal);
+ appFrontend->startAppCommand(QString(), program, inTerminal);
}
Index: languages/python/pythonsupportpart.cpp
===================================================================
--- languages/python/pythonsupportpart.cpp.orig 2005-10-05 08:33:05.000000000 -0500
+++ languages/python/pythonsupportpart.cpp 2006-01-20 16:39:41.127982000 -0600
@@ -304,7 +304,7 @@
{
bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevpythonsupport/run/terminal");
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), program, inTerminal);
+ appFrontend->startAppCommand(QString(), program, inTerminal);
}
Index: languages/ruby/rubysupport_part.cpp
===================================================================
--- languages/ruby/rubysupport_part.cpp.orig 2005-10-05 08:33:18.000000000 -0500
+++ languages/ruby/rubysupport_part.cpp 2006-01-20 16:40:22.729342000 -0600
@@ -508,7 +508,7 @@
void RubySupportPart::startApplication(const QString &program) {
bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevrubysupport/run/terminal");
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), program, inTerminal);
+ appFrontend->startAppCommand(QString(), program, inTerminal);
}
Index: buildtools/qmake/trollprojectwidget.cpp
===================================================================
--- buildtools/qmake/trollprojectwidget.cpp.orig 2005-10-05 08:32:16.000000000 -0500
+++ buildtools/qmake/trollprojectwidget.cpp 2006-01-21 00:32:27.654386000 -0600
@@ -1759,12 +1759,12 @@
noPathFileName = info.fileName();
GroupItem *gitem = 0;
- QPtrListIterator<GroupItem> it(m_shownSubproject->groups);
- for (; it.current(); ++it)
+ QPtrListIterator<GroupItem> it1(m_shownSubproject->groups);
+ for (; it1.current(); ++it1)
{
- if ((*it)->groupType == GroupItem::groupTypeForExtension(ext))
+ if ((*it1)->groupType == GroupItem::groupTypeForExtension(ext))
{
- gitem = *it;
+ gitem = *it1;
break;
}
}
Index: languages/cpp/debugger/framestackwidget.cpp
===================================================================
--- languages/cpp/debugger/framestackwidget.cpp.orig 2005-10-05 08:33:21.000000000 -0500
+++ languages/cpp/debugger/framestackwidget.cpp 2006-01-20 16:59:34.704818000 -0600
@@ -191,9 +191,9 @@
{
QString frameStr = frame->text(0);
const char *frameData = frameStr.latin1();
- if (char *paramStart = strchr(frameData, '('))
+ if (const char *paramStart = strchr(frameData, '('))
{
- char *fnstart = paramStart-2;
+ const char *fnstart = paramStart-2;
while (fnstart > frameData)
{
if (isspace(*fnstart))
More information about the KDevelop-devel
mailing list