@ -74,7 +74,7 @@ QString QDir::homeDirPath()
QString QDir : : canonicalPath ( ) const
QString QDir : : canonicalPath ( ) const
{
{
QString r ;
QString r ;
# if defined(__GLIBC__) && !defined(PATH_MAX)
# if !defined(PATH_MAX)
char * cur = : : get_current_dir_name ( ) ;
char * cur = : : get_current_dir_name ( ) ;
if ( cur ) {
if ( cur ) {
char * tmp = canonicalize_file_name ( QFile : : encodeName ( dPath ) . data ( ) ) ;
char * tmp = canonicalize_file_name ( QFile : : encodeName ( dPath ) . data ( ) ) ;
@ -100,7 +100,7 @@ QString QDir::canonicalPath() const
// always make sure we go back to the current dir
// always make sure we go back to the current dir
: : chdir ( cur ) ;
: : chdir ( cur ) ;
}
}
# endif /* __GLIBC__ && !PATH_MAX */
# endif /* !PATH_MAX */
return r ;
return r ;
}
}
@ -162,7 +162,7 @@ QString QDir::currentDirPath()
struct stat st ;
struct stat st ;
if ( : : stat ( " . " , & st ) = = 0 ) {
if ( : : stat ( " . " , & st ) = = 0 ) {
# if defined(__GLIBC__) && !defined(PATH_MAX)
# if !defined(PATH_MAX)
char * currentName = : : get_current_dir_name ( ) ;
char * currentName = : : get_current_dir_name ( ) ;
if ( currentName ) {
if ( currentName ) {
result = QFile : : decodeName ( currentName ) ;
result = QFile : : decodeName ( currentName ) ;
@ -172,7 +172,7 @@ QString QDir::currentDirPath()
char currentName [ PATH_MAX + 1 ] ;
char currentName [ PATH_MAX + 1 ] ;
if ( : : getcwd ( currentName , PATH_MAX ) )
if ( : : getcwd ( currentName , PATH_MAX ) )
result = QFile : : decodeName ( currentName ) ;
result = QFile : : decodeName ( currentName ) ;
# endif /* __GLIBC__ && !PATH_MAX */
# endif /* !PATH_MAX */
# if defined(QT_DEBUG)
# if defined(QT_DEBUG)
if ( result . isNull ( ) )
if ( result . isNull ( ) )
qWarning ( " QDir::currentDirPath: getcwd() failed " ) ;
qWarning ( " QDir::currentDirPath: getcwd() failed " ) ;