summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fxcrt/cfx_fileaccess_posix.cpp4
-rw-r--r--core/fxcrt/fx_stream.cpp10
-rw-r--r--core/fxcrt/fx_stream.h23
3 files changed, 16 insertions, 21 deletions
diff --git a/core/fxcrt/cfx_fileaccess_posix.cpp b/core/fxcrt/cfx_fileaccess_posix.cpp
index 4aab6fef46..fdcf4ae6bb 100644
--- a/core/fxcrt/cfx_fileaccess_posix.cpp
+++ b/core/fxcrt/cfx_fileaccess_posix.cpp
@@ -6,6 +6,10 @@
#include "core/fxcrt/cfx_fileaccess_posix.h"
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
#include <memory>
#include "third_party/base/ptr_util.h"
diff --git a/core/fxcrt/fx_stream.cpp b/core/fxcrt/fx_stream.cpp
index 337cbb325c..4d61b0a6ec 100644
--- a/core/fxcrt/fx_stream.cpp
+++ b/core/fxcrt/fx_stream.cpp
@@ -15,6 +15,16 @@
#include "core/fxcrt/fx_safe_types.h"
#include "third_party/base/ptr_util.h"
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
+#include <direct.h>
+
+struct CFindFileDataA {
+ HANDLE m_Handle;
+ bool m_bEnd;
+ WIN32_FIND_DATAA m_FindData;
+};
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
+
namespace {
class CFX_CRTFileStream final : public IFX_SeekableStream {
diff --git a/core/fxcrt/fx_stream.h b/core/fxcrt/fx_stream.h
index 8d0a596bd9..b41d413723 100644
--- a/core/fxcrt/fx_stream.h
+++ b/core/fxcrt/fx_stream.h
@@ -12,20 +12,16 @@
#include "core/fxcrt/retain_ptr.h"
#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
-#include <direct.h>
-class CFindFileDataA;
+struct CFindFileDataA;
typedef CFindFileDataA FX_FileHandle;
#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#include <dirent.h>
-#include <fcntl.h>
-#include <sys/stat.h>
#include <sys/types.h>
-#include <unistd.h>
-
typedef DIR FX_FileHandle;
+
#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
FX_FileHandle* FX_OpenFolder(const char* path);
@@ -108,19 +104,4 @@ class IFX_SeekableStream : public IFX_SeekableReadStream,
bool Flush() override = 0;
};
-#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
-class CFindFileData {
- public:
- virtual ~CFindFileData() {}
- HANDLE m_Handle;
- bool m_bEnd;
-};
-
-class CFindFileDataA : public CFindFileData {
- public:
- ~CFindFileDataA() override {}
- WIN32_FIND_DATAA m_FindData;
-};
-#endif
-
#endif // CORE_FXCRT_FX_STREAM_H_