00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ACE_OS_INCLUDE_OS_DIRENT_H
00017 #define ACE_OS_INCLUDE_OS_DIRENT_H
00018
00019 #include "ace/pre.h"
00020
00021 #include "ace/config-all.h"
00022
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif
00026
00027 #include "ace/os_include/sys/os_types.h"
00028 #include "ace/os_include/os_limits.h"
00029
00030 #if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620)
00031 # include "ace/os_include/os_unistd.h"
00032 #endif
00033
00034 #if !defined (ACE_LACKS_DIRENT_H)
00035 # include <dirent.h>
00036 #endif
00037
00038
00039 #ifdef __cplusplus
00040 extern "C"
00041 {
00042 #endif
00043
00044 #if !defined (MAXNAMLEN)
00045 # define MAXNAMLEN NAME_MAX
00046 #endif
00047
00048
00049 #if !defined (ACE_HAS_DIRENT)
00050 typedef int ACE_DIR;
00051 struct dirent {
00052 };
00053 #endif
00054
00055 #if defined (ACE_LACKS_STRUCT_DIR)
00056 struct dirent {
00057 unsigned short d_ino;
00058 unsigned short d_off;
00059 unsigned short d_reclen;
00060
00061
00062
00063 ACE_TCHAR *d_name;
00064 };
00065
00066 #define ACE_DIRENT dirent
00067
00068 struct ACE_DIR {
00069
00070 ACE_TCHAR *directory_name_;
00071
00072
00073 HANDLE current_handle_;
00074
00075
00076 ACE_DIRENT *dirent_;
00077
00078
00079 ACE_TEXT_WIN32_FIND_DATA fdata_;
00080
00081
00082 int started_reading_;
00083 };
00084 #elif defined (ACE_WIN32) && (__BORLANDC__) && defined (ACE_USES_WCHAR)
00085 #define ACE_DIRENT wdirent
00086 typedef wDIR ACE_DIR;
00087 #else
00088 #define ACE_DIRENT dirent
00089 typedef DIR ACE_DIR;
00090 #endif
00091
00092 #if defined rewinddir
00093 # undef rewinddir
00094 #endif
00095
00096 #if defined (ACE_LACKS_SCANDIR_PROTOTYPE)
00097 int scandir (const char *,
00098 struct dirent ***,
00099 int (*) (const struct dirent *),
00100 int (*) (const void *, const void *));
00101 #endif
00102
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106
00107 #include "ace/post.h"
00108 #endif