Go to the documentation of this file.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 #define ACE_HAS_TCHAR_DIRENT
00068
00069 struct ACE_DIR {
00070
00071 ACE_TCHAR *directory_name_;
00072
00073
00074 HANDLE current_handle_;
00075
00076
00077 ACE_DIRENT *dirent_;
00078
00079
00080 ACE_TEXT_WIN32_FIND_DATA fdata_;
00081
00082
00083 int started_reading_;
00084 };
00085 #elif defined (ACE_WIN32) && (__BORLANDC__) && defined (ACE_USES_WCHAR)
00086 #define ACE_HAS_TCHAR_DIRENT
00087 #define ACE_DIRENT wdirent
00088 typedef wDIR ACE_DIR;
00089 #else
00090 #define ACE_DIRENT dirent
00091 typedef DIR ACE_DIR;
00092 #endif
00093
00094 #if defined (ACE_LACKS_SCANDIR_PROTOTYPE)
00095 int scandir (const char *,
00096 struct dirent ***,
00097 int (*) (const struct dirent *),
00098 int (*) (const void *, const void *));
00099 #endif
00100
00101 #if defined (ACE_LACKS_ALPHASORT_PROTOTYPE)
00102 int alphasort (const void *, const void *);
00103 #endif
00104
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108
00109 #include "ace/post.h"
00110 #endif