Remove _FX_CPU_ usage.

In one case, the current statement:
expands out to "#if false == false || false == false", so
SIZEOF_UNSIGNED_LONG is always defined as 8.

In another case the _FX_CPU_ check is commented out and replaced with

In both cases, use defined(ARCH_CPU_64_BITS) to correctly check for
64-bit architecture. Then remove the _FX_CPU_=_FX_X64_ define.

Bug: pdfium:853
Change-Id: Ie8a988af96f8a4b89b5cd3625dd9e9b268b0aa97
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/79832
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index ba5ea8a..18f6ce9 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -108,11 +108,6 @@
     "//build/config/compiler:no_size_t_to_int_warning",
   ]
   defines = []
-  if (is_linux || is_chromeos) {
-    if (current_cpu == "x64") {
-      defines += [ "_FX_CPU_=_FX_X64_" ]
-    }
-  }
   if (is_win) {
     cflags += [
       "/wd4324",
diff --git a/third_party/libtiff/0000-build-config.patch b/third_party/libtiff/0000-build-config.patch
index 400bc9e..6ea3ccf 100644
--- a/third_party/libtiff/0000-build-config.patch
+++ b/third_party/libtiff/0000-build-config.patch
@@ -111,10 +111,7 @@
 +/* According typedef int  int32_t; in the fx_system.h*/
 +#define SIZEOF_INT 4
 +
-+/* Sunliang.Liu 20110325. We should config the correct long size for tif 
-+   fax4decode optimize in tif_fax3.c  -- Linux64 decode issue. 
-+   TESTDOC: Bug #23661 - z1.tif. */
-+#if _FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_
++#if defined(ARCH_CPU_64_BITS)
 +/* The size of `unsigned long', as computed by sizeof. */
 +#define SIZEOF_UNSIGNED_LONG 8
 +#else
@@ -168,7 +165,7 @@
 +
 +#else           // linux/unix
 +
-+#if 0 //_FX_CPU_ == _FX_X64_  // linux/unix 64
++#if defined(ARCH_CPU_64_BITS)
 +
 +/* Signed 64-bit type formatter */
 +#define TIFF_INT64_FORMAT "%ld"
@@ -179,6 +176,9 @@
 +/* Signed 64-bit type */
 +#define TIFF_INT64_T signed long
 +
++/* Unsigned 64-bit type */
++#define TIFF_UINT64_T unsigned long
++
 +#else           // linux/unix 32
 +
 +/* Signed 64-bit type formatter */
@@ -190,11 +190,11 @@
 +/* Signed 64-bit type */
 +#define TIFF_INT64_T signed long long
 +
-+#endif            // end _FX_CPU_
-+
 +/* Unsigned 64-bit type */
 +#define TIFF_UINT64_T unsigned long long
 +
++#endif  // define(ARCH_CPU_64_BITS)
++
 +#endif
 +
 +
diff --git a/third_party/libtiff/tiffconf.h b/third_party/libtiff/tiffconf.h
index 6818e3d..ba23de1 100644
--- a/third_party/libtiff/tiffconf.h
+++ b/third_party/libtiff/tiffconf.h
@@ -40,10 +40,7 @@
 /* According typedef int  int32_t; in the fx_system.h*/
 #define SIZEOF_INT 4
 
-/* Sunliang.Liu 20110325. We should config the correct long size for tif 
-   fax4decode optimize in tif_fax3.c  -- Linux64 decode issue. 
-   TESTDOC: Bug #23661 - z1.tif. */
-#if _FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_
+#if defined(ARCH_CPU_64_BITS)
 /* The size of `unsigned long', as computed by sizeof. */
 #define SIZEOF_UNSIGNED_LONG 8
 #else
@@ -97,7 +94,7 @@
 
 #else           // linux/unix
 
-#if 0 //_FX_CPU_ == _FX_X64_  // linux/unix 64
+#if defined(ARCH_CPU_64_BITS)
 
 /* Signed 64-bit type formatter */
 #define TIFF_INT64_FORMAT "%ld"
@@ -108,6 +105,9 @@
 /* Signed 64-bit type */
 #define TIFF_INT64_T signed long
 
+/* Unsigned 64-bit type */
+#define TIFF_UINT64_T unsigned long
+
 #else           // linux/unix 32
 
 /* Signed 64-bit type formatter */
@@ -119,11 +119,11 @@
 /* Signed 64-bit type */
 #define TIFF_INT64_T signed long long
 
-#endif            // end _FX_CPU_
-
 /* Unsigned 64-bit type */
 #define TIFF_UINT64_T unsigned long long
 
+#endif  // define(ARCH_CPU_64_BITS)
+
 #endif