Remove fx_system.h from tiffconf.h.

- No need to include <string.h> via fx_system.h. Just set HAVE_STRING_H
  and libtiff will correctly include <string>.
- No need to use FXSYS_snprintf() in libtiff. snprintf() works just
  fine.

Change-Id: I790af5180d24f5d38a1d3f2aa63078c78310c964
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82710
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/third_party/libtiff/0000-build-config.patch b/third_party/libtiff/0000-build-config.patch
index 6ea3ccf..6bc3023 100644
--- a/third_party/libtiff/0000-build-config.patch
+++ b/third_party/libtiff/0000-build-config.patch
@@ -10,16 +10,6 @@
  
  #ifdef HAVE_FCNTL_H
  # include <fcntl.h>
-@@ -59,8 +59,7 @@
- 
- #if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)
- #undef snprintf
--#define snprintf _TIFF_snprintf_f
--extern int snprintf(char* str, size_t size, const char* format, ...);
-+#define snprintf FXSYS_snprintf
- #endif
- 
- #include "tiffio.h"
 diff a/third_party/libtiff/tif_jpeg.c b/third_party/libtiff/tif_jpeg.c
 --- a/third_party/libtiff/tif_jpeg.c
 +++ b/third_party/libtiff/tif_jpeg.c
@@ -68,7 +58,7 @@
 diff a/third_party/libtiff/tiffconf.h b/third_party/libtiff/tiffconf.h
 --- /dev/null
 +++ b/third_party/libtiff/tiffconf.h
-@@ -0,0 +1,253 @@
+@@ -0,0 +1,256 @@
 +/* libtiff/tiffconf.h.  Generated by configure.  */
 +/*
 +  Configuration defines for installed libtiff.
@@ -78,8 +68,9 @@
 +#ifndef _TIFFCONF_
 +#define _TIFFCONF_
 +
++#include <stdint.h>
++
 +#include "build/build_config.h"
-+#include "core/fxcrt/fx_system.h"
 +
 +//NOTE: The tiff codec requires an ANSI C compiler environment for building and 
 +//    presumes an ANSI C environment for use.
@@ -97,8 +88,10 @@
 +#define HAVE_IEEEFP 1
 +
 +/* Define to 1 if you have the <string.h> header file. */
-+//#define HAVE_STRING_H 1
-+//fx_system.h already include the string.h in ANSIC
++#define HAVE_STRING_H 1
++
++/* Define to 1 if you have snprintf(). */
++#define HAVE_SNPRINTF 1
 +
 +/* Define to 1 if you have the <search.h> header file. */
 +#if defined(OS_WIN)
diff --git a/third_party/libtiff/tiffconf.h b/third_party/libtiff/tiffconf.h
index ba23de1..062443a 100644
--- a/third_party/libtiff/tiffconf.h
+++ b/third_party/libtiff/tiffconf.h
@@ -7,8 +7,9 @@
 #ifndef _TIFFCONF_
 #define _TIFFCONF_
 
+#include <stdint.h>
+
 #include "build/build_config.h"
-#include "core/fxcrt/fx_system.h"
 
 //NOTE: The tiff codec requires an ANSI C compiler environment for building and 
 //    presumes an ANSI C environment for use.
@@ -26,8 +27,10 @@
 #define HAVE_IEEEFP 1
 
 /* Define to 1 if you have the <string.h> header file. */
-//#define HAVE_STRING_H 1
-//fx_system.h already include the string.h in ANSIC
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have snprintf(). */
+#define HAVE_SNPRINTF 1
 
 /* Define to 1 if you have the <search.h> header file. */
 #if defined(OS_WIN)
diff --git a/third_party/libtiff/tiffiop.h b/third_party/libtiff/tiffiop.h
index b345996..ab1b052 100644
--- a/third_party/libtiff/tiffiop.h
+++ b/third_party/libtiff/tiffiop.h
@@ -57,7 +57,8 @@
 
 #if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)
 #undef snprintf
-#define snprintf FXSYS_snprintf
+#define snprintf _TIFF_snprintf_f
+extern int snprintf(char* str, size_t size, const char* format, ...);
 #endif
 
 #include "tiffio.h"