diff options
Diffstat (limited to 'tinydir.h')
-rw-r--r-- | tinydir.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -115,6 +115,9 @@ extern "C" { # define _TINYDIR_FUNC static inline #endif +/* readdir_r usage; define TINYDIR_USE_READDIR_R to use it (if supported) */ +#ifdef TINYDIR_USE_READDIR_R + /* readdir_r is a POSIX-only function, and may not be available under various * environments/settings, e.g. MinGW. Use readdir fallback */ #if _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE ||\ @@ -139,6 +142,8 @@ extern "C" { # define _TINYDIR_USE_READDIR #endif +#endif + /* MINGW32 has two versions of dirent, ASCII and UNICODE*/ #ifndef _MSC_VER #if (defined __MINGW32__) && (defined _UNICODE) |