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 | |
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')
-rw-r--r-- | mkspecs/common/aix/qplatformdefs.h | 10 | ||||
-rw-r--r-- | mkspecs/common/posix/qplatformdefs.h | 16 |
2 files changed, 26 insertions, 0 deletions
diff --git a/mkspecs/common/aix/qplatformdefs.h b/mkspecs/common/aix/qplatformdefs.h index 57c5a76..b3abf68 100644 --- a/mkspecs/common/aix/qplatformdefs.h +++ b/mkspecs/common/aix/qplatformdefs.h @@ -101,6 +101,16 @@ #define QT_SOCKOPTLEN_T int #endif +#ifdef QT_LARGEFILE_SUPPORT +#undef QT_DIR +#undef QT_OPENDIR +#undef QT_CLOSEDIR + +#define QT_DIR DIR64 +#define QT_OPENDIR ::opendir64 +#define QT_CLOSEDIR ::closedir64 +#endif + #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) // AIX 4.3 and better #define QT_SNPRINTF ::snprintf 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 |