From aed7b33e893b97f4734ab6fa87a220231a321c60 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Fri, 11 Mar 2016 13:35:43 -0800 Subject: Set HAVE_SEARCH_H so that pdfium/xfa builds with VS 2015 Enabling of XFA-Forms in crrev.com/1775173002 broke VS 2015 builds because of a conflict between the lfind declaration in libtiff\tiffiop.h and the one that ships with VS 2015. Defining HAVE_SEARCH_H for VS 2015 builds fixes this problem BUG=440500,593996 R=thakis@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1781043005 . --- third_party/libtiff/0001-build-config.patch | 17 +++++++++++++++++ third_party/libtiff/README.pdfium | 1 + third_party/libtiff/tiffconf.h | 6 +++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 third_party/libtiff/0001-build-config.patch diff --git a/third_party/libtiff/0001-build-config.patch b/third_party/libtiff/0001-build-config.patch new file mode 100644 index 0000000000..c393154658 --- /dev/null +++ b/third_party/libtiff/0001-build-config.patch @@ -0,0 +1,17 @@ +diff --git a/third_party/libtiff/tiffconf.h b/third_party/libtiff/tiffconf.h +index bcc0bc5..ca749da 100644 +--- a/third_party/libtiff/tiffconf.h ++++ b/third_party/libtiff/tiffconf.h +@@ -39,7 +39,11 @@ + //fx_system.h already include the string.h in ANSIC + + /* Define to 1 if you have the header file. */ +-/*#define HAVE_SEARCH_H 1 */ ++#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER >= 1900 ++// search.h is always available in VS 2015 and above, and may be ++// available in earlier versions. ++#define HAVE_SEARCH_H 1 ++#endif + + /* The size of a `int', as computed by sizeof. */ + /* According typedef int int32_t; in the fx_system.h*/ diff --git a/third_party/libtiff/README.pdfium b/third_party/libtiff/README.pdfium index bee4729556..c9b0f48407 100644 --- a/third_party/libtiff/README.pdfium +++ b/third_party/libtiff/README.pdfium @@ -10,3 +10,4 @@ TIFF library. Local Modifications: 0000-build-config.patch: Local build configuration changes. +0001-build-config.patch: Enable HAVE_SEARCH_H in tiffconf.h for VS 2015 diff --git a/third_party/libtiff/tiffconf.h b/third_party/libtiff/tiffconf.h index bcc0bc5848..ca749da3ff 100644 --- a/third_party/libtiff/tiffconf.h +++ b/third_party/libtiff/tiffconf.h @@ -39,7 +39,11 @@ //fx_system.h already include the string.h in ANSIC /* Define to 1 if you have the header file. */ -/*#define HAVE_SEARCH_H 1 */ +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER >= 1900 +// search.h is always available in VS 2015 and above, and may be +// available in earlier versions. +#define HAVE_SEARCH_H 1 +#endif /* The size of a `int', as computed by sizeof. */ /* According typedef int int32_t; in the fx_system.h*/ -- cgit v1.2.3