From 8481c71db0e3abed7bd12669116b223a65bebbb4 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 25 Jul 2018 17:35:19 +0000 Subject: 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 Commit-Queue: Lei Zhang --- core/fxcrt/cfx_fileaccess_posix.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'core/fxcrt/cfx_fileaccess_posix.h') diff --git a/core/fxcrt/cfx_fileaccess_posix.h b/core/fxcrt/cfx_fileaccess_posix.h index 84fc81bd98..381f115a13 100644 --- a/core/fxcrt/cfx_fileaccess_posix.h +++ b/core/fxcrt/cfx_fileaccess_posix.h @@ -8,10 +8,14 @@ #define CORE_FXCRT_CFX_FILEACCESS_POSIX_H_ #include "core/fxcrt/fileaccess_iface.h" +#include "core/fxcrt/fx_system.h" + +#if _FX_PLATFORM_ != _FX_PLATFORM_LINUX_ && \ + _FX_PLATFORM_ != _FX_PLATFORM_APPLE_ && \ + _FX_PLATFORM_ != _FX_PLATFORM_ANDROID_ +#error "Included on the wrong platform" +#endif -#if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_ || \ - _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || \ - _FX_PLATFORM_ == _FX_PLATFORM_ANDROID_ class CFX_FileAccess_Posix : public FileAccessIface { public: CFX_FileAccess_Posix(); @@ -36,6 +40,5 @@ class CFX_FileAccess_Posix : public FileAccessIface { protected: int32_t m_nFD; }; -#endif #endif // CORE_FXCRT_CFX_FILEACCESS_POSIX_H_ -- cgit v1.2.3