1diff -u /dev/null tiff-4.0.9/libtiff/mingw/Makefile
2--- /dev/null
3+++ tiff-4.0.9/libtiff/mingw/Makefile	2018-11-04 17:01:00.000000000 +0300
4@@ -0,0 +1,68 @@
5+CROSS	=
6+CC	= $(CROSS)gcc
7+
8+DLLNAME = libtiff-5.dll
9+LIBNAME = libtiff.dll.a
10+INCLUDES= -I. -Iexternal/include
11+CPPFLAGS= -DDLL_EXPORT
12+CFLAGS	= -O2 -Wall
13+LDFLAGS = -Wl,--enable-auto-image-base -Wl,--no-undefined
14+LDLIBS	= -Lexternal/lib -ljpeg -lz
15+
16+OBJ =	tif_aux.o \
17+	tif_close.o \
18+	tif_codec.o \
19+	tif_color.o \
20+	tif_compress.o \
21+	tif_dir.o \
22+	tif_dirinfo.o \
23+	tif_dirread.o \
24+	tif_dirwrite.o \
25+	tif_dumpmode.o \
26+	tif_error.o \
27+	tif_extension.o \
28+	tif_fax3.o \
29+	tif_fax3sm.o \
30+	tif_flush.o \
31+	tif_getimage.o \
32+	tif_jbig.o \
33+	tif_jpeg.o \
34+	tif_jpeg_12.o \
35+	tif_luv.o \
36+	tif_lzma.o \
37+	tif_lzw.o \
38+	tif_next.o \
39+	tif_ojpeg.o \
40+	tif_open.o \
41+	tif_packbits.o \
42+	tif_pixarlog.o \
43+	tif_predict.o \
44+	tif_print.o \
45+	tif_read.o \
46+	tif_strip.o \
47+	tif_swab.o \
48+	tif_thunder.o \
49+	tif_tile.o \
50+	tif_version.o \
51+	tif_warning.o \
52+	tif_write.o \
53+	tif_zip.o \
54+	tif_win32.o
55+
56+all: $(DLLNAME)
57+
58+.PHONY: clean distclean
59+.SUFFIXES:
60+.SUFFIXES: .o .c
61+
62+%.o: ../%.c
63+	$(CC) -c $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -o $@ $<
64+
65+$(DLLNAME): $(OBJ)
66+	$(CC) -shared -o $(DLLNAME) ../libtiff.def $(OBJ) $(LDFLAGS) $(LDLIBS) \
67+		-Xlinker --out-implib -Xlinker $(LIBNAME)
68+
69+distclean: clean
70+	$(RM) *.dll *.a
71+clean:
72+	$(RM) *.o
73diff -u /dev/null tiff-4.0.9/libtiff/mingw/tif_config.h
74--- /dev/null
75+++ tiff-4.0.9/libtiff/mingw/tif_config.h	2018-11-04 17:01:00.000000000 +0300
76@@ -0,0 +1,435 @@
77+/* libtiff/tif_config.h.  Generated from tif_config.h.in by configure.  */
78+/* libtiff/tif_config.h.in.  Generated from configure.ac by autoheader.  */
79+
80+/* Define if building universal (internal helper macro) */
81+/* #undef AC_APPLE_UNIVERSAL_BUILD */
82+
83+/* Support CCITT Group 3 & 4 algorithms */
84+#define CCITT_SUPPORT 1
85+
86+/* Pick up YCbCr subsampling info from the JPEG data stream to support files
87+   lacking the tag (default enabled). */
88+#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
89+
90+/* enable partial strip reading for large strips (experimental) */
91+/* #undef CHUNKY_STRIP_READ_SUPPORT */
92+
93+/* Support C++ stream API (requires C++ compiler) */
94+#define CXX_SUPPORT 1
95+
96+/* Treat extra sample as alpha (default enabled). The RGBA interface will
97+   treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
98+   packages produce RGBA files but don't mark the alpha properly. */
99+#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
100+
101+/* enable deferred strip/tile offset/size loading (experimental) */
102+/* #undef DEFER_STRILE_LOAD */
103+
104+/* Define to 1 if you have the <assert.h> header file. */
105+#define HAVE_ASSERT_H 1
106+
107+/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
108+   */
109+#define HAVE_DECL_OPTARG 1
110+
111+/* Define to 1 if you have the <dlfcn.h> header file. */
112+/* #undef HAVE_DLFCN_H */
113+
114+/* Define to 1 if you have the <fcntl.h> header file. */
115+#define HAVE_FCNTL_H 1
116+
117+/* Define to 1 if you have the `floor' function. */
118+#define HAVE_FLOOR 1
119+
120+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
121+/* #undef HAVE_FSEEKO */
122+
123+/* Define to 1 if you have the `getopt' function. */
124+#define HAVE_GETOPT 1
125+
126+/* Define to 1 if you have the <GLUT/glut.h> header file. */
127+/* #undef HAVE_GLUT_GLUT_H */
128+
129+/* Define to 1 if you have the <GL/glut.h> header file. */
130+/* #undef HAVE_GL_GLUT_H */
131+
132+/* Define to 1 if you have the <GL/glu.h> header file. */
133+#define HAVE_GL_GLU_H 1
134+
135+/* Define to 1 if you have the <GL/gl.h> header file. */
136+#define HAVE_GL_GL_H 1
137+
138+/* Define as 0 or 1 according to the floating point format suported by the
139+   machine */
140+#define HAVE_IEEEFP 1
141+
142+/* Define to 1 if the system has the type `int16'. */
143+/* #undef HAVE_INT16 */
144+
145+/* Define to 1 if the system has the type `int32'. */
146+/* #undef HAVE_INT32 */
147+
148+/* Define to 1 if the system has the type `int8'. */
149+/* #undef HAVE_INT8 */
150+
151+/* Define to 1 if you have the <inttypes.h> header file. */
152+#define HAVE_INTTYPES_H 1
153+
154+/* Define to 1 if you have the <io.h> header file. */
155+#define HAVE_IO_H 1
156+
157+/* Define to 1 if you have the `isascii' function. */
158+#define HAVE_ISASCII 1
159+
160+/* Define to 1 if you have the `jbg_newlen' function. */
161+/* #undef HAVE_JBG_NEWLEN */
162+
163+/* Define to 1 if you have the `lfind' function. */
164+#define HAVE_LFIND 1
165+
166+/* Define to 1 if you have the <limits.h> header file. */
167+#define HAVE_LIMITS_H 1
168+
169+/* Define to 1 if you have the <malloc.h> header file. */
170+#define HAVE_MALLOC_H 1
171+
172+/* Define to 1 if you have the `memmove' function. */
173+#define HAVE_MEMMOVE 1
174+
175+/* Define to 1 if you have the <memory.h> header file. */
176+#define HAVE_MEMORY_H 1
177+
178+/* Define to 1 if you have the `memset' function. */
179+#define HAVE_MEMSET 1
180+
181+/* Define to 1 if you have the `mmap' function. */
182+/* #undef HAVE_MMAP */
183+
184+/* Define to 1 if you have the <OpenGL/glu.h> header file. */
185+/* #undef HAVE_OPENGL_GLU_H */
186+
187+/* Define to 1 if you have the <OpenGL/gl.h> header file. */
188+/* #undef HAVE_OPENGL_GL_H */
189+
190+/* Define to 1 if you have the `pow' function. */
191+#define HAVE_POW 1
192+
193+/* Define if you have POSIX threads libraries and header files. */
194+/* #undef HAVE_PTHREAD */
195+
196+/* Define to 1 if you have the <search.h> header file. */
197+#define HAVE_SEARCH_H 1
198+
199+/* Define to 1 if you have the `setmode' function. */
200+#define HAVE_SETMODE 1
201+
202+/* Define to 1 if you have the `snprintf' function. */
203+#define HAVE_SNPRINTF 1
204+
205+/* Define to 1 if you have the `sqrt' function. */
206+#define HAVE_SQRT 1
207+
208+/* Define to 1 if you have the <stdint.h> header file. */
209+#define HAVE_STDINT_H 1
210+
211+/* Define to 1 if you have the <stdlib.h> header file. */
212+#define HAVE_STDLIB_H 1
213+
214+/* Define to 1 if you have the `strcasecmp' function. */
215+#define HAVE_STRCASECMP 1
216+
217+/* Define to 1 if you have the `strchr' function. */
218+#define HAVE_STRCHR 1
219+
220+/* Define to 1 if you have the <strings.h> header file. */
221+#define HAVE_STRINGS_H 1
222+
223+/* Define to 1 if you have the <string.h> header file. */
224+#define HAVE_STRING_H 1
225+
226+/* Define to 1 if you have the `strrchr' function. */
227+#define HAVE_STRRCHR 1
228+
229+/* Define to 1 if you have the `strstr' function. */
230+#define HAVE_STRSTR 1
231+
232+/* Define to 1 if you have the `strtol' function. */
233+#define HAVE_STRTOL 1
234+
235+/* Define to 1 if you have the `strtoul' function. */
236+#define HAVE_STRTOUL 1
237+
238+/* Define to 1 if you have the `strtoull' function. */
239+#define HAVE_STRTOULL 1
240+
241+/* Define to 1 if you have the <sys/stat.h> header file. */
242+#define HAVE_SYS_STAT_H 1
243+
244+/* Define to 1 if you have the <sys/time.h> header file. */
245+#define HAVE_SYS_TIME_H 1
246+
247+/* Define to 1 if you have the <sys/types.h> header file. */
248+#define HAVE_SYS_TYPES_H 1
249+
250+/* Define to 1 if you have the <unistd.h> header file. */
251+#define HAVE_UNISTD_H 1
252+
253+/* Use nonstandard varargs form for the GLU tesselator callback */
254+/* #undef HAVE_VARARGS_GLU_TESSCB */
255+
256+/* Define to 1 if you have the <windows.h> header file. */
257+#define HAVE_WINDOWS_H 1
258+
259+/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
260+   (Intel) */
261+#define HOST_BIGENDIAN 0
262+
263+/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
264+#define HOST_FILLORDER FILLORDER_LSB2MSB
265+
266+/* Support ISO JBIG compression (requires JBIG-KIT library) */
267+/* #undef JBIG_SUPPORT */
268+
269+/* 8/12 bit libjpeg dual mode enabled */
270+/* #undef JPEG_DUAL_MODE_8_12 */
271+
272+/* Support JPEG compression (requires IJG JPEG library) */
273+#define JPEG_SUPPORT 1
274+
275+/* 12bit libjpeg primary include file with path */
276+/* #undef LIBJPEG_12_PATH */
277+
278+/* Support LogLuv high dynamic range encoding */
279+#define LOGLUV_SUPPORT 1
280+
281+/* Define to the sub-directory where libtool stores uninstalled libraries. */
282+#define LT_OBJDIR ".libs/"
283+
284+/* Support LZMA2 compression */
285+/* #undef LZMA_SUPPORT */
286+
287+/* Support LZW algorithm */
288+#define LZW_SUPPORT 1
289+
290+/* Support Microsoft Document Imaging format */
291+#define MDI_SUPPORT 1
292+
293+/* Support NeXT 2-bit RLE algorithm */
294+#define NEXT_SUPPORT 1
295+
296+/* Support Old JPEG compresson (read-only) */
297+#define OJPEG_SUPPORT 1
298+
299+/* Name of package */
300+#define PACKAGE "tiff"
301+
302+/* Define to the address where bug reports for this package should be sent. */
303+#define PACKAGE_BUGREPORT "tiff@lists.maptools.org"
304+
305+/* Define to the full name of this package. */
306+#define PACKAGE_NAME "LibTIFF Software"
307+
308+/* Define to the full name and version of this package. */
309+#define PACKAGE_STRING "LibTIFF Software 4.0.9"
310+
311+/* Define to the one symbol short name of this package. */
312+#define PACKAGE_TARNAME "tiff"
313+
314+/* Define to the home page for this package. */
315+#define PACKAGE_URL ""
316+
317+/* Define to the version of this package. */
318+#define PACKAGE_VERSION "4.0.9"
319+
320+/* Support Macintosh PackBits algorithm */
321+#define PACKBITS_SUPPORT 1
322+
323+/* Support Pixar log-format algorithm (requires Zlib) */
324+#define PIXARLOG_SUPPORT 1
325+
326+/* Define to necessary symbol if this constant uses a non-standard name on
327+   your system. */
328+/* #undef PTHREAD_CREATE_JOINABLE */
329+
330+/* The size of `signed int', as computed by sizeof. */
331+#define SIZEOF_SIGNED_INT 4
332+
333+/* The size of `signed long', as computed by sizeof. */
334+#define SIZEOF_SIGNED_LONG 4
335+
336+/* The size of `signed long long', as computed by sizeof. */
337+#define SIZEOF_SIGNED_LONG_LONG 8
338+
339+/* The size of `signed short', as computed by sizeof. */
340+#define SIZEOF_SIGNED_SHORT 2
341+
342+/* The size of `size_t', as computed by sizeof. */
343+#ifdef _WIN64
344+#define SIZEOF_SIZE_T 8
345+#else
346+#define SIZEOF_SIZE_T 4
347+#endif
348+
349+/* The size of `unsigned char *', as computed by sizeof. */
350+#ifdef _WIN64
351+#define SIZEOF_UNSIGNED_CHAR_P 8
352+#else
353+#define SIZEOF_UNSIGNED_CHAR_P 4
354+#endif
355+
356+/* The size of `unsigned int', as computed by sizeof. */
357+#define SIZEOF_UNSIGNED_INT 4
358+
359+/* The size of `unsigned long', as computed by sizeof. */
360+#define SIZEOF_UNSIGNED_LONG 4
361+
362+/* The size of `unsigned long long', as computed by sizeof. */
363+#define SIZEOF_UNSIGNED_LONG_LONG 8
364+
365+/* The size of `unsigned short', as computed by sizeof. */
366+#define SIZEOF_UNSIGNED_SHORT 2
367+
368+/* Define to 1 if you have the ANSI C header files. */
369+#define STDC_HEADERS 1
370+
371+/* Support strip chopping (whether or not to convert single-strip uncompressed
372+   images to mutiple strips of specified size to reduce memory usage) */
373+#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
374+
375+/* Default size of the strip in bytes (when strip chopping enabled) */
376+#define STRIP_SIZE_DEFAULT 8192
377+
378+/* Enable SubIFD tag (330) support */
379+#define SUBIFD_SUPPORT 1
380+
381+/* Support ThunderScan 4-bit RLE algorithm */
382+#define THUNDER_SUPPORT 1
383+
384+/* Signed 16-bit type */
385+#define TIFF_INT16_T signed short
386+
387+/* Signed 32-bit type formatter */
388+#define TIFF_INT32_FORMAT "%d"
389+
390+/* Signed 32-bit type */
391+#define TIFF_INT32_T signed int
392+
393+/* Signed 64-bit type formatter */
394+#define TIFF_INT64_FORMAT "%I64d"
395+
396+/* Signed 64-bit type */
397+#define TIFF_INT64_T signed long long
398+
399+/* Signed 8-bit type */
400+#define TIFF_INT8_T signed char
401+
402+/* Pointer difference type formatter */
403+#define TIFF_PTRDIFF_FORMAT "%ld"
404+
405+/* Pointer difference type */
406+#define TIFF_PTRDIFF_T ptrdiff_t
407+
408+/* Size type formatter */
409+#ifdef _WIN64
410+#define TIFF_SIZE_FORMAT "%I64u"
411+#else
412+#define TIFF_SIZE_FORMAT "%u"
413+#endif
414+
415+/* Unsigned size type */
416+#ifdef _WIN64
417+#define TIFF_SIZE_T unsigned long long
418+#else
419+#define TIFF_SIZE_T unsigned int
420+#endif
421+
422+/* Signed size type formatter */
423+#ifdef _WIN64
424+#define TIFF_SSIZE_FORMAT "%I64d"
425+#else
426+#define TIFF_SSIZE_FORMAT "%d"
427+#endif
428+
429+/* Signed size type */
430+#ifdef _WIN64
431+#define TIFF_SSIZE_T signed long long
432+#else
433+#define TIFF_SSIZE_T signed int
434+#endif
435+
436+/* Unsigned 16-bit type */
437+#define TIFF_UINT16_T unsigned short
438+
439+/* Unsigned 32-bit type formatter */
440+#define TIFF_UINT32_FORMAT "%u"
441+
442+/* Unsigned 32-bit type */
443+#define TIFF_UINT32_T unsigned int
444+
445+/* Unsigned 64-bit type formatter */
446+#define TIFF_UINT64_FORMAT "%I64u"
447+
448+/* Unsigned 64-bit type */
449+#define TIFF_UINT64_T unsigned long long
450+
451+/* Unsigned 8-bit type */
452+#define TIFF_UINT8_T unsigned char
453+
454+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
455+#define TIME_WITH_SYS_TIME 1
456+
457+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
458+/* #undef TM_IN_SYS_TIME */
459+
460+/* define to use win32 IO system */
461+#define USE_WIN32_FILEIO 1
462+
463+/* Version number of package */
464+#define VERSION "4.0.9"
465+
466+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
467+   significant byte first (like Motorola and SPARC, unlike Intel). */
468+#if defined AC_APPLE_UNIVERSAL_BUILD
469+# if defined __BIG_ENDIAN__
470+#  define WORDS_BIGENDIAN 1
471+# endif
472+#else
473+# ifndef WORDS_BIGENDIAN
474+/* #  undef WORDS_BIGENDIAN */
475+# endif
476+#endif
477+
478+/* Define to 1 if the X Window System is missing or not being used. */
479+/* #undef X_DISPLAY_MISSING */
480+
481+/* Support Deflate compression */
482+#define ZIP_SUPPORT 1
483+
484+/* Enable large inode numbers on Mac OS X 10.5.  */
485+#ifndef _DARWIN_USE_64_BIT_INODE
486+# define _DARWIN_USE_64_BIT_INODE 1
487+#endif
488+
489+/* Number of bits in a file offset, on hosts where this is settable. */
490+/* #undef _FILE_OFFSET_BITS */
491+
492+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
493+/* #undef _LARGEFILE_SOURCE */
494+
495+/* Define for large files, on AIX-style hosts. */
496+/* #undef _LARGE_FILES */
497+
498+/* Define to empty if `const' does not conform to ANSI C. */
499+/* #undef const */
500+
501+/* Define to `__inline__' or `__inline' if that's what the C compiler
502+   calls it, or to nothing if 'inline' is not supported under any name.  */
503+#ifndef __cplusplus
504+/* #undef inline */
505+#endif
506+
507+/* Define to `long int' if <sys/types.h> does not define. */
508+/* #undef off_t */
509+
510+/* Define to `unsigned int' if <sys/types.h> does not define. */
511+/* #undef size_t */
512diff -u /dev/null tiff-4.0.9/libtiff/mingw/tiffconf.h
513--- /dev/null
514+++ tiff-4.0.9/libtiff/mingw/tiffconf.h	2018-11-04 17:01:00.000000000 +0300
515@@ -0,0 +1,132 @@
516+/* libtiff/tiffconf.h.  Generated from tiffconf.h.in by configure.  */
517+/*
518+  Configuration defines for installed libtiff.
519+  This file maintained for backward compatibility. Do not use definitions
520+  from this file in your programs.
521+*/
522+
523+#ifndef _TIFFCONF_
524+#define _TIFFCONF_
525+
526+/* Signed 16-bit type */
527+#define TIFF_INT16_T signed short
528+
529+/* Signed 32-bit type */
530+#define TIFF_INT32_T signed int
531+
532+/* Signed 64-bit type */
533+#define TIFF_INT64_T signed long long
534+
535+/* Signed 8-bit type */
536+#define TIFF_INT8_T signed char
537+
538+/* Unsigned 16-bit type */
539+#define TIFF_UINT16_T unsigned short
540+
541+/* Unsigned 32-bit type */
542+#define TIFF_UINT32_T unsigned int
543+
544+/* Unsigned 64-bit type */
545+#define TIFF_UINT64_T unsigned long long
546+
547+/* Unsigned 8-bit type */
548+#define TIFF_UINT8_T unsigned char
549+
550+/* Signed size type */
551+#if defined _WIN64
552+#define TIFF_SSIZE_T signed long long
553+#else
554+#define TIFF_SSIZE_T signed int
555+#endif
556+
557+/* Pointer difference type */
558+#define TIFF_PTRDIFF_T ptrdiff_t
559+
560+/* Define to 1 if the system has the type `int16'. */
561+/* #undef HAVE_INT16 */
562+
563+/* Define to 1 if the system has the type `int32'. */
564+/* #undef HAVE_INT32 */
565+
566+/* Define to 1 if the system has the type `int8'. */
567+/* #undef HAVE_INT8 */
568+
569+/* Compatibility stuff. */
570+
571+/* Define as 0 or 1 according to the floating point format suported by the
572+   machine */
573+#define HAVE_IEEEFP 1
574+
575+/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
576+#define HOST_FILLORDER FILLORDER_LSB2MSB
577+
578+/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
579+   (Intel) */
580+#define HOST_BIGENDIAN 0
581+
582+/* Support CCITT Group 3 & 4 algorithms */
583+#define CCITT_SUPPORT 1
584+
585+/* Support JPEG compression (requires IJG JPEG library) */
586+#define JPEG_SUPPORT 1
587+
588+/* Support JBIG compression (requires JBIG-KIT library) */
589+/* #undef JBIG_SUPPORT */
590+
591+/* Support LogLuv high dynamic range encoding */
592+#define LOGLUV_SUPPORT 1
593+
594+/* Support LZW algorithm */
595+#define LZW_SUPPORT 1
596+
597+/* Support NeXT 2-bit RLE algorithm */
598+#define NEXT_SUPPORT 1
599+
600+/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
601+   fails with unpatched IJG JPEG library) */
602+#define OJPEG_SUPPORT 1
603+
604+/* Support Macintosh PackBits algorithm */
605+#define PACKBITS_SUPPORT 1
606+
607+/* Support Pixar log-format algorithm (requires Zlib) */
608+#define PIXARLOG_SUPPORT 1
609+
610+/* Support ThunderScan 4-bit RLE algorithm */
611+#define THUNDER_SUPPORT 1
612+
613+/* Support Deflate compression */
614+#define ZIP_SUPPORT 1
615+
616+/* Support strip chopping (whether or not to convert single-strip uncompressed
617+   images to mutiple strips of ~8Kb to reduce memory usage) */
618+#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
619+
620+/* Enable SubIFD tag (330) support */
621+#define SUBIFD_SUPPORT 1
622+
623+/* Treat extra sample as alpha (default enabled). The RGBA interface will
624+   treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
625+   packages produce RGBA files but don't mark the alpha properly. */
626+#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
627+
628+/* Pick up YCbCr subsampling info from the JPEG data stream to support files
629+   lacking the tag (default enabled). */
630+#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
631+
632+/* Support MS MDI magic number files as TIFF */
633+#define MDI_SUPPORT 1
634+
635+/*
636+ * Feature support definitions.
637+ * XXX: These macros are obsoleted. Don't use them in your apps!
638+ * Macros stays here for backward compatibility and should be always defined.
639+ */
640+#define COLORIMETRY_SUPPORT
641+#define YCBCR_SUPPORT
642+#define CMYK_SUPPORT
643+#define ICC_SUPPORT
644+#define PHOTOSHOP_SUPPORT
645+#define IPTC_SUPPORT
646+
647+#endif /* _TIFFCONF_ */
648