diff options
Diffstat (limited to 'ace/OS_Dirent.cpp')
-rw-r--r-- | ace/OS_Dirent.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/ace/OS_Dirent.cpp b/ace/OS_Dirent.cpp index f9b28910063..a3c0f5f2f8e 100644 --- a/ace/OS_Dirent.cpp +++ b/ace/OS_Dirent.cpp @@ -9,13 +9,10 @@ ACE_RCSID(ace, OS_Dirent, "$Id$") # include "ace/OS_Dirent.inl" #endif /* ACE_HAS_INLINED_OS_CALLS */ - -#if defined (ACE_WIN32) -// Non-Win32 versions in .inl file - DIR * -ACE_OS_Dirent::opendir (const ACE_TCHAR *filename) +ACE_OS_Dirent::opendir_emulation (const ACE_TCHAR *filename) { +#if defined (ACE_WIN32) DIR *dir; ACE_NEW_RETURN (dir, DIR, 0); ACE_NEW_RETURN (dir->directory_name_, @@ -25,21 +22,30 @@ ACE_OS_Dirent::opendir (const ACE_TCHAR *filename) dir->current_handle_ = INVALID_HANDLE_VALUE; dir->started_reading_ = 0; return dir; +#else /* ACE_WIN32 */ + ACE_UNUSED_ARG (filename); + ACE_NOTSUP_RETURN (0); +#endif /* ACE_WIN32 */ } void -ACE_OS_Dirent::closedir (DIR *d) +ACE_OS_Dirent::closedir_emulation (DIR *d) { +#if defined (ACE_WIN32) if (d->current_handle_ != INVALID_HANDLE_VALUE) ::FindClose (d->current_handle_); d->current_handle_ = INVALID_HANDLE_VALUE; d->started_reading_ = 0; +#else /* ACE_WIN32 */ + ACE_UNUSED_ARG (d); +#endif /* ACE_WIN32 */ } struct dirent * -ACE_OS_Dirent::readdir (DIR *d) +ACE_OS_Dirent::readdir_emulation (DIR *d) { +#if defined (ACE_WIN32) if (!d->started_reading_) { d->current_handle_ = ACE_TEXT_FindFirstFile (d->directory_name_, @@ -82,6 +88,8 @@ ACE_OS_Dirent::readdir (DIR *d) } else return 0; -} - +#else /* ACE_WIN32 */ + ACE_UNUSED_ARG (d); + ACE_NOTSUP_RETURN (0); #endif /* ACE_WIN32 */ +} |