summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_fileaccess_windows.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-07-25 17:35:19 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-25 17:35:19 +0000
commit8481c71db0e3abed7bd12669116b223a65bebbb4 (patch)
tree9330a14cfba4a3aaf83870b4803e2ecd0ccacd82 /core/fxcrt/cfx_fileaccess_windows.h
parent5b322338073162afab98bb28c920692c73b995ed (diff)
downloadpdfium-8481c71db0e3abed7bd12669116b223a65bebbb4.tar.xz
Only build cfx_fileaccess_windows.cpp on Windows.
- Remove #if guards in the .cpp file and flip the #if guard in the header to produce an error when incorrectly included. - Do the same for cfx_fileaccess_posix.cpp. - Also remove forward declarations for win32 APIs. Change-Id: I81056ea6198d342e62744bd3240b3a28ac53d5c0 Reviewed-on: https://pdfium-review.googlesource.com/38410 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_fileaccess_windows.h')
-rw-r--r--core/fxcrt/cfx_fileaccess_windows.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/fxcrt/cfx_fileaccess_windows.h b/core/fxcrt/cfx_fileaccess_windows.h
index 451462bbca..4352a2b521 100644
--- a/core/fxcrt/cfx_fileaccess_windows.h
+++ b/core/fxcrt/cfx_fileaccess_windows.h
@@ -8,8 +8,12 @@
#define CORE_FXCRT_CFX_FILEACCESS_WINDOWS_H_
#include "core/fxcrt/fileaccess_iface.h"
+#include "core/fxcrt/fx_system.h"
+
+#if _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
+#error "Included on the wrong platform"
+#endif
-#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
class CFX_FileAccess_Windows : public FileAccessIface {
public:
CFX_FileAccess_Windows();
@@ -34,6 +38,5 @@ class CFX_FileAccess_Windows : public FileAccessIface {
protected:
void* m_hFile;
};
-#endif
#endif // CORE_FXCRT_CFX_FILEACCESS_WINDOWS_H_