Bug 62823 - Compile error in kdevelop/lib/util/urlutil.cpp
Summary: Compile error in kdevelop/lib/util/urlutil.cpp
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-17 12:06 UTC by Peter Antonius
Modified: 2003-08-18 10:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Antonius 2003-08-17 12:06:03 UTC
Version:           CVS Version 2003-08-17 (using KDE KDE 3.1.1)
Installed from:    SuSE RPMs
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux) compiler that follows with suse 8.2 
OS:          Linux

Problems with the #includes. Undefined realpath and PATH_MAX. 

Have made a very small patch that fixes the problem.

--- urlutil.cpp 2003-08-17 11:50:18.000000000 +0200
+++ urlutil.cpp_orig    2003-08-17 11:37:28.000000000 +0200
@@ -19,15 +19,10 @@
 #include <kdebug.h>
 #include <qdir.h>

-#include <sys/param.h>
 #include <unistd.h>
-#include <limits.h>
-#include <stdlib.h>

 #include "urlutil.h"

-
-
 QString URLUtil::filename(const QString & name) {
   int slashPos = name.findRev("/");
   return slashPos<0 ? name : name.mid(slashPos+1);
@@ -203,10 +198,10 @@
 QString URLUtil::canonicalPath( const QString & path )
 {
     QString r;
-    char cur[MAXPATHLEN+1];
-    if ( ::getcwd( cur, MAXPATHLEN ) )
+    char cur[PATH_MAX+1];
+    if ( ::getcwd( cur, PATH_MAX ) )
     {
-        char tmp[MAXPATHLEN+1];
+        char tmp[PATH_MAX+1];
         if( ::realpath( QFile::encodeName( path ), tmp ) )
         {
             r = QFile::decodeName( tmp );
Comment 1 Amilcar do Carmo Lucas 2003-08-18 10:15:38 UTC
Do not report compiling errors to the bug database. Please use the mailing 
list instead. 
But thanks for reporting this