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 /mkspecs/common/posix/qplatformdefs.h | |
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 'mkspecs/common/posix/qplatformdefs.h')
-rw-r--r-- | mkspecs/common/posix/qplatformdefs.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h index fe50de2..e29bc6f 100644 --- a/mkspecs/common/posix/qplatformdefs.h +++ b/mkspecs/common/posix/qplatformdefs.h @@ -132,6 +132,22 @@ // Posix extensions to C89 #define QT_FILENO fileno +// Directory iteration +#define QT_DIR DIR + +#define QT_OPENDIR ::opendir +#define QT_CLOSEDIR ::closedir + +#if defined(QT_USE_XOPEN_LFS_EXTENSIONS) && defined(QT_LARGEFILE_SUPPORT) +#define QT_DIRENT struct dirent64 +#define QT_READDIR ::readdir64 +#define QT_READDIR_R ::readdir64_r +#else +#define QT_DIRENT struct dirent +#define QT_READDIR ::readdir +#define QT_READDIR_R ::readdir_r +#endif + #define QT_SOCKLEN_T socklen_t #define QT_SOCKET_CONNECT ::connect |