src/corelib/io/qfsfileengine.cpp
changeset 7 f7bc934e204c
parent 3 41300fa6a67c
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtCore module of the Qt Toolkit.
     7 ** This file is part of the QtCore module of the Qt Toolkit.
     8 **
     8 **
   142 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
   142 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
   143     if (path.size() == 1 && path.at(0) == QLatin1Char('/'))
   143     if (path.size() == 1 && path.at(0) == QLatin1Char('/'))
   144         return path;
   144         return path;
   145 #endif
   145 #endif
   146     // Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here.
   146     // Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here.
   147 #if defined(Q_OS_LINIX) || defined(Q_OS_SYMBIAN)
   147 #if defined(Q_OS_LINUX) || defined(Q_OS_SYMBIAN)
       
   148     // ... but Linux with uClibc does not have it
       
   149 #if !defined(__UCLIBC__)
   148     char *ret = realpath(path.toLocal8Bit().constData(), (char*)0);
   150     char *ret = realpath(path.toLocal8Bit().constData(), (char*)0);
   149     if (ret) {
   151     if (ret) {
   150         QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret));
   152         QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret));
   151         free(ret);
   153         free(ret);
   152         return canonicalPath;
   154         return canonicalPath;
   153     }
   155     }
       
   156 #endif
   154 #endif
   157 #endif
   155 
   158 
   156     QFileInfo fi;
   159     QFileInfo fi;
   157     const QChar slash(QLatin1Char('/'));
   160     const QChar slash(QLatin1Char('/'));
   158     QString tmpPath = path;
   161     QString tmpPath = path;