summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_system.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-08-03 13:34:08 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-04 16:42:35 +0000
commita2da7c5612f1fa26dde508da2a527a4bab381de0 (patch)
tree84e7343808b5818305e91e4b2bf80d7764dcddef /core/fxcrt/fx_system.h
parent1952d17428ba5d509dc21cd8d49abba1bd2d2c5d (diff)
downloadpdfium-a2da7c5612f1fa26dde508da2a527a4bab381de0.tar.xz
Enforce recent VC++ version (2015 or later).
Remove ifdef'd code for versions we know will no longer work. Change-Id: I036c80168f846df1b98e9df4972f84655e8418fb Reviewed-on: https://pdfium-review.googlesource.com/10051 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_system.h')
-rw-r--r--core/fxcrt/fx_system.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/core/fxcrt/fx_system.h b/core/fxcrt/fx_system.h
index a3dc21bb46..47d588c521 100644
--- a/core/fxcrt/fx_system.h
+++ b/core/fxcrt/fx_system.h
@@ -53,6 +53,10 @@
#error Sorry, can not figure out target OS. Please specify _FX_OS_ macro.
#endif
+#if defined(_MSC_VER) && _MSC_VER < 1900
+#error Sorry, VC++ 2015 or later is required to compile PDFium.
+#endif // defined(_MSC_VER) && _MSC_VER < 1900
+
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
#include <windows.h>
#include <sal.h>
@@ -106,19 +110,9 @@ typedef int FX_STRSIZE;
#define FX_BEZIER 0.5522847498308f
// NOTE: prevent use of the return value from snprintf() since some platforms
-// have different return values (e.g. windows _vsnprintf()), and provide
-// versions that always NUL-terminate.
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
-void FXSYS_snprintf(char* str,
- size_t size,
- _Printf_format_string_ const char* fmt,
- ...);
-void FXSYS_vsnprintf(char* str, size_t size, const char* fmt, va_list ap);
-#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
+// have different return values.
#define FXSYS_snprintf (void)snprintf
#define FXSYS_vsnprintf (void)vsnprintf
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
-
#define FXSYS_sprintf DO_NOT_USE_SPRINTF_DIE_DIE_DIE
#define FXSYS_vsprintf DO_NOT_USE_VSPRINTF_DIE_DIE_DIE