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 --- BUILD.gn | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'BUILD.gn') diff --git a/BUILD.gn b/BUILD.gn index 85e819fab4..09cf28597c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -854,8 +854,6 @@ jumbo_static_library("fxcrt") { "core/fxcrt/cfx_bitstream.h", "core/fxcrt/cfx_datetime.cpp", "core/fxcrt/cfx_datetime.h", - "core/fxcrt/cfx_fileaccess_windows.cpp", - "core/fxcrt/cfx_fileaccess_windows.h", "core/fxcrt/cfx_fixedbufgrow.h", "core/fxcrt/cfx_memorystream.cpp", "core/fxcrt/cfx_memorystream.h", @@ -934,6 +932,12 @@ jumbo_static_library("fxcrt") { "core/fxcrt/cfx_fileaccess_posix.h", ] } + if (is_win) { + sources += [ + "core/fxcrt/cfx_fileaccess_windows.cpp", + "core/fxcrt/cfx_fileaccess_windows.h", + ] + } if (pdf_enable_xfa) { sources += [ "core/fxcrt/cfx_char.cpp", -- cgit v1.2.3