[Bug 62823] New: Compile error in kdevelop/lib/util/urlutil.cpp

Peter Antonius peter.antonius at e-privat.dk
Sun Aug 17 12:07:02 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=62823     
           Summary: Compile error in kdevelop/lib/util/urlutil.cpp
           Product: kdevelop
           Version: unspecified
          Platform: SuSE RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at kdevelop.org
        ReportedBy: peter.antonius at e-privat.dk


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 );




More information about the KDevelop-devel mailing list