Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Side by Side Diff: third_party/libtiff/0000-build-config.patch

Issue 1563103002: XFA: Upgrade to libtiff 4.0.6. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rename to libtiff Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/BUILD.gn ('k') | third_party/libtiff/README.pdfium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff a/third_party/libtiff/tiffiop.h b/third_party/libtiff/tiffiop.h
2 --- a/third_party/libtiff/tiffiop.h
3 +++ b/third_party/libtiff/tiffiop.h
4 @@ -30,7 +30,7 @@
5 * ``Library-private'' definitions.
6 */
7
8 -#include "tif_config.h"
9 +#include "tiffconf.h"
10
11 #ifdef HAVE_FCNTL_H
12 # include <fcntl.h>
13 diff a/third_party/libtiff/tif_jpeg.c b/third_party/libtiff/tif_jpeg.c
14 --- a/third_party/libtiff/tif_jpeg.c
15 +++ b/third_party/libtiff/tif_jpeg.c
16 @@ -85,8 +85,16 @@
17 # define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
18 #endif
19
20 -#include "jpeglib.h"
21 -#include "jerror.h"
22 +#if defined(USE_SYSTEM_LIBJPEG)
23 +#include <jerror.h>
24 +#include <jpeglib.h>
25 +#elif defined(USE_LIBJPEG_TURBO)
26 +#include "third_party/libjpeg_turbo/jerror.h"
27 +#include "third_party/libjpeg_turbo/jpeglib.h"
28 +#else
29 +#include "third_party/libjpeg/jerror.h"
30 +#include "third_party/libjpeg/jpeglib.h"
31 +#endif
32
33 /*
34 * Do we want to do special processing suitable for when JSAMPLE is a
35 diff a/third_party/libtiff/tif_ojpeg.c b/third_party/libtiff/tif_ojpeg.c
36 --- a/third_party/libtiff/tif_ojpeg.c
37 +++ b/third_party/libtiff/tif_ojpeg.c
38 @@ -214,8 +214,17 @@
39 # define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
40 #endif
41
42 -#include "jpeglib.h"
43 -#include "jerror.h"
44 +#if defined(USE_SYSTEM_LIBJPEG)
45 +#include <jerror.h>
46 +#include <jpeglib.h>
47 +#elif defined(USE_LIBJPEG_TURBO)
48 +#include "third_party/libjpeg_turbo/jerror.h"
49 +#include "third_party/libjpeg_turbo/jpeglib.h"
50 +#else
51 +#include "third_party/libjpeg/jerror.h"
52 +#include "third_party/libjpeg/jpeglib.h"
53 +#endif
54 +
55
56 typedef struct jpeg_error_mgr jpeg_error_mgr;
57 typedef struct jpeg_common_struct jpeg_common_struct;
58 diff a/third_party/libtiff/tif_pixarlog.c b/third_party/libtiff/tif_pixarlog.c
59 --- a/third_party/libtiff/tif_pixarlog.c
60 +++ b/third_party/libtiff/tif_pixarlog.c
61 @@ -90,7 +90,7 @@
62 */
63
64 #include "tif_predict.h"
65 -#include "zlib.h"
66 +#include "../zlib_v128/zlib.h"
67
68 #include <stdio.h>
69 #include <stdlib.h>
70 diff a/third_party/libtiff/tif_zip.c b/third_party/libtiff/tif_zip.c
71 --- a/third_party/libtiff/tif_zip.c
72 +++ b/third_party/libtiff/tif_zip.c
73 @@ -47,7 +47,7 @@
74 * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz.
75 */
76 #include "tif_predict.h"
77 -#include "zlib.h"
78 +#include "../zlib_v128/zlib.h"
79
80 #include <stdio.h>
81
82 diff a/third_party/libtiff/tiffconf.h b/third_party/libtiff/tiffconf.h
83 --- /dev/null
84 +++ b/third_party/libtiff/tiffconf.h
85 @@ -0,0 +1,252 @@
86 +/* libtiff/tiffconf.h. Generated by configure. */
87 +/*
88 + Configuration defines for installed libtiff.
89 + This file maintained for backward compatibility. Do not use definitions
90 + from this file in your programs.
91 +*/
92 +#ifndef _TIFFCONF_
93 +#define _TIFFCONF_
94 +
95 +#ifndef _FX_SYSTEM_H_
96 +# include "../../core/include/fxcrt/fx_system.h"
97 +#endif
98 +
99 +//NOTE: The tiff codec requires an ANSI C compiler environment for building and
100 +// presumes an ANSI C environment for use.
101 +
102 +/* Define to 1 if you have the <fcntl.h> header file. */
103 +/* Define to 1 if you have the <sys/types.h> header file. */
104 +#if _FX_OS_ == _FX_WIN32_MOBILE_
105 +# define O_RDONLY 0x0000 /* open for reading only */
106 +# define O_WRONLY 0x0001 /* open for writing only */
107 +# define O_RDWR 0x0002 /* open for reading and writing */
108 +# define O_CREAT 0x0100 /* create and open file */
109 +# define O_TRUNC 0x0200 /* open and truncate */
110 +#else
111 +# define HAVE_SYS_TYPES_H 1
112 +# define HAVE_FCNTL_H 1
113 +#endif
114 +
115 +/* Compatibility stuff. */
116 +
117 +/* Define to 1 if you have the <assert.h> header file. */
118 +#define HAVE_ASSERT_H 1
119 +
120 +/* Define as 0 or 1 according to the floating point format suported by the
121 + machine */
122 +#define HAVE_IEEEFP 1
123 +
124 +/* Define to 1 if you have the <string.h> header file. */
125 +//#define HAVE_STRING_H 1
126 +//fx_system.h already include the string.h in ANSIC
127 +
128 +/* Define to 1 if you have the <search.h> header file. */
129 +/*#define HAVE_SEARCH_H 1 */
130 +
131 +/* The size of a `int', as computed by sizeof. */
132 +/* According typedef int int32_t; in the fx_system.h*/
133 +#define SIZEOF_INT 4
134 +
135 +/* Sunliang.Liu 20110325. We should config the correct long size for tif
136 + fax4decode optimize in tif_fax3.c -- Linux64 decode issue.
137 + TESTDOC: Bug #23661 - z1.tif. */
138 +#if _FX_CPU_ == _FX_WIN64_ || _FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_
139 +/* The size of `unsigned long', as computed by sizeof. */
140 +#define SIZEOF_UNSIGNED_LONG 8
141 +#else
142 +#define SIZEOF_UNSIGNED_LONG 4
143 +#endif
144 +
145 +#define HAVE_SNPRINTF 1
146 +
147 +/* Signed 8-bit type */
148 +#define TIFF_INT8_T signed char
149 +
150 +/* Unsigned 8-bit type */
151 +#define TIFF_UINT8_T unsigned char
152 +
153 +/* Signed 16-bit type */
154 +#define TIFF_INT16_T signed short
155 +
156 +/* Unsigned 16-bit type */
157 +#define TIFF_UINT16_T unsigned short
158 +
159 +/* Signed 32-bit type */
160 +#define TIFF_INT32_T signed int
161 +
162 +/* Unsigned 32-bit type */
163 +#define TIFF_UINT32_T unsigned int
164 +
165 +/* Signed 32-bit type formatter */
166 +#define TIFF_INT32_FORMAT "%d"
167 +
168 +/* Unsigned 32-bit type formatter */
169 +#define TIFF_UINT32_FORMAT "%u"
170 +
171 +#ifdef _MSC_VER // windows
172 +
173 +/* Signed 64-bit type formatter */
174 +#define TIFF_INT64_FORMAT "%I64d"
175 +
176 +/* Unsigned 64-bit type formatter */
177 +#define TIFF_UINT64_FORMAT "%I64u"
178 +
179 +/* Signed 64-bit type */
180 +#define TIFF_INT64_T signed __int64
181 +
182 +/* Unsigned 64-bit type */
183 +#define TIFF_UINT64_T unsigned __int64
184 +
185 +#else // linux/unix
186 +
187 +#if 0 //_FX_CPU_ == _FX_X64_ // linux/unix 64
188 +
189 +/* Signed 64-bit type formatter */
190 +#define TIFF_INT64_FORMAT "%ld"
191 +
192 +/* Unsigned 64-bit type formatter */
193 +#define TIFF_UINT64_FORMAT "%lu"
194 +
195 +/* Signed 64-bit type */
196 +#define TIFF_INT64_T signed long
197 +
198 +#else // linux/unix 32
199 +
200 +/* Signed 64-bit type formatter */
201 +#define TIFF_INT64_FORMAT "%lld"
202 +
203 +/* Unsigned 64-bit type formatter */
204 +#define TIFF_UINT64_FORMAT "%llu"
205 +
206 +/* Signed 64-bit type */
207 +#define TIFF_INT64_T signed long long
208 +
209 +#endif // end _FX_CPU_
210 +
211 +/* Unsigned 64-bit type */
212 +#define TIFF_UINT64_T unsigned long long
213 +
214 +#endif
215 +
216 +
217 +/* Signed size type */
218 +#ifdef _MSC_VER
219 +
220 +#if defined(_WIN64)
221 +#define TIFF_SSIZE_T signed __int64
222 +#else
223 +#define TIFF_SSIZE_T signed int
224 +#endif
225 +
226 +#else
227 +
228 +#define TIFF_SSIZE_T signed long
229 +
230 +#endif
231 +
232 +/* Signed size type formatter */
233 +#if defined(_WIN64)
234 +#define TIFF_SSIZE_FORMAT "%I64d"
235 +#else
236 +#define TIFF_SSIZE_FORMAT "%ld"
237 +#endif
238 +
239 +/* Pointer difference type */
240 +#ifdef _MSC_VER
241 +#define TIFF_PTRDIFF_T long
242 +#else
243 +#define TIFF_PTRDIFF_T ptrdiff_t
244 +#endif
245 +
246 +/* Signed 64-bit type */
247 +/*#define TIFF_INT64_T signed __int64*/
248 +
249 +/* Unsigned 64-bit type */
250 +/*#define TIFF_UINT64_T unsigned __int64*/
251 +
252 +/* Define to `__inline__' or `__inline' if that's what the C compiler
253 + calls it, or to nothing if 'inline' is not supported under any name. */
254 +#ifndef __cplusplus
255 +# ifndef inline
256 +# define inline __inline
257 +# endif
258 +#endif
259 +
260 +#define lfind _lfind
261 +
262 +#define BSDTYPES
263 +
264 +/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
265 +#define HOST_FILLORDER FILLORDER_LSB2MSB
266 +
267 +/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
268 + (Intel) */
269 +#if _FX_ENDIAN_ == _FX_BIG_ENDIAN_
270 +# define HOST_BIGENDIAN 1
271 +#else
272 +# define HOST_BIGENDIAN 0
273 +#endif
274 +
275 +/* Support CCITT Group 3 & 4 algorithms */
276 +#define CCITT_SUPPORT 1
277 +
278 +/* Support JPEG compression (requires IJG JPEG library) */
279 +#define JPEG_SUPPORT 1
280 +
281 +/* Support LogLuv high dynamic range encoding */
282 +#define LOGLUV_SUPPORT 1
283 +
284 +/* Support LZW algorithm */
285 +#define LZW_SUPPORT 1
286 +
287 +/* Support NeXT 2-bit RLE algorithm */
288 +#define NEXT_SUPPORT 1
289 +
290 +/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
291 + fails with unpatched IJG JPEG library) */
292 +#define OJPEG_SUPPORT 1
293 +
294 +/* Support Macintosh PackBits algorithm */
295 +#define PACKBITS_SUPPORT 1
296 +
297 +/* Support Pixar log-format algorithm (requires Zlib) */
298 +#define PIXARLOG_SUPPORT 1
299 +
300 +/* Support ThunderScan 4-bit RLE algorithm */
301 +#define THUNDER_SUPPORT 1
302 +
303 +/* Support Deflate compression */
304 +#define ZIP_SUPPORT 1
305 +
306 +/* Support strip chopping (whether or not to convert single-strip uncompressed
307 + images to mutiple strips of ~8Kb to reduce memory usage) */
308 +#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
309 +
310 +/* Enable SubIFD tag (330) support */
311 +#define SUBIFD_SUPPORT 1
312 +
313 +/* Treat extra sample as alpha (default enabled). The RGBA interface will
314 + treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
315 + packages produce RGBA files but don't mark the alpha properly. */
316 +#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
317 +
318 +/* Pick up YCbCr subsampling info from the JPEG data stream to support files
319 + lacking the tag (default enabled). */
320 +#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
321 +
322 +/* Support MS MDI magic number files as TIFF */
323 +#define MDI_SUPPORT 1
324 +
325 +/*
326 + * Feature support definitions.
327 + * XXX: These macros are obsoleted. Don't use them in your apps!
328 + * Macros stays here for backward compatibility and should be always defined.
329 + */
330 +#define COLORIMETRY_SUPPORT
331 +#define YCBCR_SUPPORT
332 +#define CMYK_SUPPORT
333 +#define ICC_SUPPORT
334 +#define PHOTOSHOP_SUPPORT
335 +#define IPTC_SUPPORT
336 +
337 +#endif /* _TIFFCONF_ */
OLDNEW
« no previous file with comments | « third_party/BUILD.gn ('k') | third_party/libtiff/README.pdfium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698