diff options
author | João Abecasis <joao@trolltech.com> | 2010-01-21 18:48:33 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-01-29 13:33:49 (GMT) |
commit | 1492a2edf269b368abd2af9f8ffb474489609b5d (patch) | |
tree | a009a5ff373b739b8f5d06814e49b9675d1b6788 /src/corelib/io/qfilesystemwatcher_dnotify.cpp | |
parent | 6d8ea540bd123270f0010eb5fa5e68a510ca89e7 (diff) | |
download | Qt-1492a2edf269b368abd2af9f8ffb474489609b5d.zip Qt-1492a2edf269b368abd2af9f8ffb474489609b5d.tar.gz Qt-1492a2edf269b368abd2af9f8ffb474489609b5d.tar.bz2 |
Use X/Open LFS extensions for 64-bit support on directory iteration
This boils down to using readdir64(_r) and struct dirent64 where
available. I assumed these are available in the same platforms other
such extensions are already being used.
AIX uses the additional type DIR64 and opendir64/closedir64 to
manipulate it.
Task-number: QTBUG-2781
Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_dnotify.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_dnotify.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_dnotify.cpp b/src/corelib/io/qfilesystemwatcher_dnotify.cpp index 1a218c7..82470c8 100644 --- a/src/corelib/io/qfilesystemwatcher_dnotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_dnotify.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" #include "qfilesystemwatcher.h" #include "qfilesystemwatcher_dnotify_p.h" @@ -255,16 +256,16 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths, if(fd == 0) { - DIR *d = ::opendir(path.toUtf8().constData()); + QT_DIR *d = QT_OPENDIR(path.toUtf8().constData()); if(!d) continue; // Could not open directory - DIR *parent = 0; + QT_DIR *parent = 0; QDir parentDir(path); if(!parentDir.isRoot()) { parentDir.cdUp(); - parent = ::opendir(parentDir.path().toUtf8().constData()); + parent = QT_OPENDIR(parentDir.path().toUtf8().constData()); if(!parent) { - ::closedir(d); + QT_CLOSEDIR(d); continue; } } @@ -272,8 +273,8 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths, fd = qt_safe_dup(::dirfd(d)); int parentFd = parent ? qt_safe_dup(::dirfd(parent)) : 0; - ::closedir(d); - if(parent) ::closedir(parent); + QT_CLOSEDIR(d); + if(parent) QT_CLOSEDIR(parent); Q_ASSERT(fd); if(::fcntl(fd, F_SETSIG, SIGIO) || |