Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/tkimg/files/, dev-tcltk/tkimg/
Date: Tue, 02 Oct 2018 17:02:52
Message-Id: 1538499750.380691910358a36cb69a08221b55caa89a1bffc5.tupone@gentoo
1 commit: 380691910358a36cb69a08221b55caa89a1bffc5
2 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 2 17:02:30 2018 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 2 17:02:30 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38069191
7
8 dev-tcltk/tkimg: Version bump to 1.4.7
9
10 Closes: https://bugs.gentoo.org/504968
11 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
12 Package-Manager: Portage-2.3.49, Repoman-2.3.10
13
14 dev-tcltk/tkimg/Manifest | 1 +
15 dev-tcltk/tkimg/files/tkimg-1.4.7-jpeg-9.patch | 18 +
16 dev-tcltk/tkimg/files/tkimg-1.4.7-jpeg.patch | 63 ++
17 dev-tcltk/tkimg/files/tkimg-1.4.7-png.patch | 80 +++
18 dev-tcltk/tkimg/files/tkimg-1.4.7-tclconfig.patch | 39 ++
19 dev-tcltk/tkimg/files/tkimg-1.4.7-tiff.patch | 806 ++++++++++++++++++++++
20 dev-tcltk/tkimg/files/tkimg-1.4.7-zlib.patch | 90 +++
21 dev-tcltk/tkimg/tkimg-1.4.7.ebuild | 88 +++
22 8 files changed, 1185 insertions(+)
23
24 diff --git a/dev-tcltk/tkimg/Manifest b/dev-tcltk/tkimg/Manifest
25 index a1285ebbc33..1e2e1025891 100644
26 --- a/dev-tcltk/tkimg/Manifest
27 +++ b/dev-tcltk/tkimg/Manifest
28 @@ -1,2 +1,3 @@
29 +DIST Img-Source-1.4.7.tar.gz 7259144 BLAKE2B 48794a21564864c5b20953d1504acde5512be4aaa8db0834f63b15431af0bfa8bb2050f241e7b2d9b383480b59e17567f26f45c91e9f9a7fc58600cfe6ef6595 SHA512 6a395d6263e2f46151d0d3f5c6044d87a933617981200d2663328b8c7993b8a3aacba45568cee7aa2f5d8c8d020cb63956179aab5147d25d91b8834c0dfa4b9d
30 DIST tkimg-1.4-patchset-1.tar.xz 17956 BLAKE2B f6d3e5e5f258434bd02e21271357f2e2013ce7c90f2d1862e8e7ac0f1cf235d39b1713434a00261ec442c1843a70194b4d14081a5d4cec07c8ad6bf45bbf1db3 SHA512 bd20e0beaa224c42e856e6d44d86c2a5f04c28d096c561f44c4afcf8c821bf859c602156a9be60f23f906e8da2f43c89ca358d32e8f9497296e7c5a5bf23ed69
31 DIST tkimg1.4.tar.bz2 4912894 BLAKE2B 630ce6b95f42f0883373970ff919493d34cf4a61119af9520702079c6272f9b6ddbc6241197b39ac509d9b2c76c6f3d3bd29944acea4cdc1c82134cba473818a SHA512 b03aba6e21e35b8733dbc4fa66fae67284a05e68248e5afb2a85c1520c74d0c6c5091860a3ab682f4a662a318c562339e9b7b82f050e63bbf48d1b4757d379a1
32
33 diff --git a/dev-tcltk/tkimg/files/tkimg-1.4.7-jpeg-9.patch b/dev-tcltk/tkimg/files/tkimg-1.4.7-jpeg-9.patch
34 new file mode 100644
35 index 00000000000..23000ac7922
36 --- /dev/null
37 +++ b/dev-tcltk/tkimg/files/tkimg-1.4.7-jpeg-9.patch
38 @@ -0,0 +1,18 @@
39 +Fix build with jpeg-9, bug #520886
40 +
41 +--- a/jpeg/jpeg.c 2010-06-17 15:40:24.000000000 +0200
42 ++++ b/jpeg/jpeg.c 2018-02-07 23:26:38.050073397 +0100
43 +@@ -53,6 +53,13 @@
44 + */
45 +
46 + #include "tkimg.h"
47 ++#ifndef FALSE
48 ++#define FALSE 0
49 ++#endif
50 ++#ifndef TRUE
51 ++#define TRUE 1
52 ++#endif
53 ++#define HAVE_BOOLEAN
54 + #include "jpegtcl.h"
55 +
56 + static int SetupJPegLibrary(Tcl_Interp *interp);
57
58 diff --git a/dev-tcltk/tkimg/files/tkimg-1.4.7-jpeg.patch b/dev-tcltk/tkimg/files/tkimg-1.4.7-jpeg.patch
59 new file mode 100644
60 index 00000000000..969b953a19a
61 --- /dev/null
62 +++ b/dev-tcltk/tkimg/files/tkimg-1.4.7-jpeg.patch
63 @@ -0,0 +1,63 @@
64 + libjpeg/Makefile.in | 2 +-
65 + libjpeg/configure.in | 19 -------------------
66 + libjpeg/jpegtclDecls.h | 4 ++--
67 + 4 files changed, 4 insertions(+), 39 deletions(-)
68 +
69 +diff --git a/libjpeg/Makefile.in b/libjpeg/Makefile.in
70 +index cf2aca8..2d937b1 100644
71 +--- a/libjpeg/Makefile.in
72 ++++ b/libjpeg/Makefile.in
73 +@@ -107,7 +107,7 @@ RANLIB = @RANLIB@
74 + RANLIB_STUB = @RANLIB_STUB@
75 + SHLIB_CFLAGS = @SHLIB_CFLAGS@
76 + SHLIB_LD = @SHLIB_LD@
77 +-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
78 ++SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ -ljpeg
79 + STLIB_LD = @STLIB_LD@
80 + TCL_DEFS = @TCL_DEFS@
81 + TCL_BIN_DIR = @TCL_BIN_DIR@
82 +diff --git a/libjpeg/configure.in b/libjpeg/configure.in
83 +index 378806d..327e2bd 100644
84 +--- a/libjpeg/configure.in
85 ++++ b/libjpeg/configure.in
86 +@@ -54,25 +54,6 @@ JPEG_CC=$CC
87 +
88 + TEA_ADD_SOURCES([jpegtcl.c jpegtclStubInit.c])
89 +
90 +-TEA_ADD_SOURCES([
91 +- ../compat/libjpeg/jcapimin.c ../compat/libjpeg/jcapistd.c ../compat/libjpeg/jccoefct.c
92 +- ../compat/libjpeg/jccolor.c ../compat/libjpeg/jcdctmgr.c ../compat/libjpeg/jchuff.c
93 +- ../compat/libjpeg/jcinit.c ../compat/libjpeg/jcmainct.c ../compat/libjpeg/jcmarker.c
94 +- ../compat/libjpeg/jcmaster.c ../compat/libjpeg/jcomapi.c ../compat/libjpeg/jcparam.c
95 +- ../compat/libjpeg/jcarith.c ../compat/libjpeg/jcprepct.c ../compat/libjpeg/jcsample.c
96 +- ../compat/libjpeg/jctrans.c ../compat/libjpeg/jdapimin.c ../compat/libjpeg/jdapistd.c
97 +- ../compat/libjpeg/jdatadst.c ../compat/libjpeg/jdatasrc.c ../compat/libjpeg/jdcoefct.c
98 +- ../compat/libjpeg/jdcolor.c ../compat/libjpeg/jddctmgr.c ../compat/libjpeg/jdhuff.c
99 +- ../compat/libjpeg/jdinput.c ../compat/libjpeg/jdmainct.c ../compat/libjpeg/jdmarker.c
100 +- ../compat/libjpeg/jdmaster.c ../compat/libjpeg/jdmerge.c ../compat/libjpeg/jdarith.c
101 +- ../compat/libjpeg/jdpostct.c ../compat/libjpeg/jdsample.c ../compat/libjpeg/jdtrans.c
102 +- ../compat/libjpeg/jerror.c ../compat/libjpeg/jfdctflt.c ../compat/libjpeg/jfdctfst.c
103 +- ../compat/libjpeg/jfdctint.c ../compat/libjpeg/jidctflt.c ../compat/libjpeg/jidctfst.c
104 +- ../compat/libjpeg/jidctint.c ../compat/libjpeg/jaricom.c ../compat/libjpeg/jquant1.c
105 +- ../compat/libjpeg/jquant2.c ../compat/libjpeg/jutils.c ../compat/libjpeg/jmemmgr.c
106 +- ../compat/libjpeg/jmemansi.c
107 +-])
108 +-
109 + TEA_ADD_HEADERS([jpegtcl.h jpegtclDecls.h])
110 +
111 + TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${srcdir}`\"])
112 +diff --git a/libjpeg/jpegtclDecls.h b/libjpeg/jpegtclDecls.h
113 +index fef99c2..f751b16 100644
114 +--- a/libjpeg/jpegtclDecls.h
115 ++++ b/libjpeg/jpegtclDecls.h
116 +@@ -30,8 +30,8 @@ EXTERN int Jpegtcl_SafeInit(Tcl_Interp *interp);
117 +
118 + /* undef Tcl macros that conflict with libjpeg stuff (sigh) */
119 + #undef EXTERN
120 +-#include "../compat/libjpeg/jpeglib.h"
121 +-#include "../compat/libjpeg/jerror.h"
122 ++#include "@GENTOO_PORTAGE_EPREFIX@/usr/include/jpeglib.h"
123 ++#include "@GENTOO_PORTAGE_EPREFIX@/usr/include/jerror.h"
124 +
125 + /* !BEGIN!: Do not edit below this line. */
126 +
127
128 diff --git a/dev-tcltk/tkimg/files/tkimg-1.4.7-png.patch b/dev-tcltk/tkimg/files/tkimg-1.4.7-png.patch
129 new file mode 100644
130 index 00000000000..787bdb3e7d4
131 --- /dev/null
132 +++ b/dev-tcltk/tkimg/files/tkimg-1.4.7-png.patch
133 @@ -0,0 +1,80 @@
134 + libpng/Makefile.in | 4 +-
135 + libpng/configure | 7 +-
136 + libpng/configure.in | 8 -
137 + libpng/pngtcl.decls | 215 +++++++++---------
138 + libpng/pngtclDecls.h | 565 ++++++++++++++++++++++++------------------------
139 + libpng/pngtclStubInit.c | 2 +-
140 + 6 files changed, 388 insertions(+), 413 deletions(-)
141 +
142 +diff --git a/libpng/Makefile.in b/libpng/Makefile.in
143 +index eb8b87e..008d331 100644
144 +--- a/libpng/Makefile.in
145 ++++ b/libpng/Makefile.in
146 +@@ -111,7 +111,7 @@ RANLIB = @RANLIB@
147 + RANLIB_STUB = @RANLIB_STUB@
148 + SHLIB_CFLAGS = @SHLIB_CFLAGS@
149 + SHLIB_LD = @SHLIB_LD@
150 +-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
151 ++SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ -lpng
152 + STLIB_LD = @STLIB_LD@
153 + TCL_DEFS = @TCL_DEFS@
154 + TCL_BIN_DIR = @TCL_BIN_DIR@
155 +@@ -154,7 +154,7 @@ CONFIG_CLEAN_FILES = Makefile
156 + CPPFLAGS = @CPPFLAGS@
157 + LIBS = @PKG_LIBS@ @LIBS@
158 + AR = @AR@
159 +-CFLAGS = @CFLAGS@ -DPNG_IMPEXP=MODULE_SCOPE -DPNG_EXTERN=MODULE_SCOPE
160 ++CFLAGS = @CFLAGS@ -DPNG_IMPEXP= -DPNG_EXTERN=MODULE_SCOPE
161 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
162 +
163 + #========================================================================
164 +@@ -179,7 +179,7 @@
165 + # of the Makefile, in the "BINARIES" variable.
166 + #========================================================================
167 +
168 +-binaries: pnglibconf.h $(BINARIES) pkgIndex.tcl
169 ++binaries: $(BINARIES) pkgIndex.tcl
170 +
171 + libraries:
172 +
173 +diff --git a/libpng/configure.in b/libpng/configure.in
174 +index c36befe..cd049c0 100644
175 +--- a/libpng/configure.in
176 ++++ b/libpng/configure.in
177 +@@ -65,14 +65,6 @@ IMG_SRCPATH(zlibtcl)
178 +
179 + TEA_ADD_SOURCES([pngtcl.c pngtclStubInit.c])
180 +
181 +-TEA_ADD_SOURCES([
182 +- ../compat/libpng/png.c ../compat/libpng/pngerror.c ../compat/libpng/pngmem.c
183 +- ../compat/libpng/pngpread.c ../compat/libpng/pngread.c ../compat/libpng/pngrio.c
184 +- ../compat/libpng/pngrtran.c ../compat/libpng/pngrutil.c ../compat/libpng/pngset.c
185 +- ../compat/libpng/pngtrans.c ../compat/libpng/pngwio.c ../compat/libpng/pngwrite.c
186 +- ../compat/libpng/pngwtran.c ../compat/libpng/pngwutil.c ../compat/libpng/pngget.c
187 +-])
188 +-
189 + TEA_ADD_HEADERS([pngtcl.h pngtclDecls.h])
190 + TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${zlibtcl_SRC_PATH}`\"])
191 + TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${zlibtcl_BUILD_PATH}`\"])
192 +diff --git a/libpng/pngtclDecls.h b/libpng/pngtclDecls.h
193 +index adf987d..2b29fa3 100644
194 +--- a/libpng/pngtclDecls.h
195 ++++ b/libpng/pngtclDecls.h
196 +@@ -20,7 +20,6 @@
197 + # undef TCL_STORAGE_CLASS
198 + # define TCL_STORAGE_CLASS DLLEXPORT
199 + #else
200 +-# define PNG_IMPEXP extern
201 + # undef USE_PNGTCL_STUBS
202 + # define USE_PNGTCL_STUBS 1
203 + #endif
204 +@@ -28,7 +27,8 @@
205 + EXTERN int Pngtcl_Init(Tcl_Interp *interp);
206 + EXTERN int Pngtcl_SafeInit(Tcl_Interp *interp);
207 +
208 +-#include "../compat/libpng/png.h"
209 ++#include <@GENTOO_PORTAGE_EPREFIX@/usr/include/png.h>
210 ++#include <@GENTOO_PORTAGE_EPREFIX@/usr/include/zlib.h>
211 +
212 + /* !BEGIN!: Do not edit below this line. */
213 +
214
215 diff --git a/dev-tcltk/tkimg/files/tkimg-1.4.7-tclconfig.patch b/dev-tcltk/tkimg/files/tkimg-1.4.7-tclconfig.patch
216 new file mode 100644
217 index 00000000000..23aa9429722
218 --- /dev/null
219 +++ b/dev-tcltk/tkimg/files/tkimg-1.4.7-tclconfig.patch
220 @@ -0,0 +1,39 @@
221 +--- a/tclconfig/tcl.m4 2018-10-02 11:46:05.621138841 +0200
222 ++++ b/tclconfig/tcl.m4 2018-10-02 11:46:56.041138841 +0200
223 +@@ -1076,7 +1076,7 @@
224 + CFLAGS=$hold_cflags])
225 + AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
226 + AC_DEFINE(MODULE_SCOPE,
227 +- [extern __attribute__((__visibility__("hidden")))],
228 ++ [extern],
229 + [Compiler support for module scope symbols])
230 + AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
231 + ])
232 +@@ -1298,7 +1298,7 @@
233 + # mingw gcc mode
234 + AC_CHECK_TOOL(RC, windres)
235 + CFLAGS_DEBUG="-g"
236 +- CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
237 ++ CFLAGS_OPTIMIZE=""
238 + SHLIB_LD='${CC} -shared'
239 + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
240 + LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
241 +@@ -1557,7 +1557,7 @@
242 + SHLIB_SUFFIX=".so"
243 +
244 + # TEA specific:
245 +- CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
246 ++ CFLAGS_OPTIMIZE=""
247 +
248 + # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
249 + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
250 +@@ -3290,9 +3290,6 @@
251 + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
252 + AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
253 + CFLAGS=$hold_cflags])
254 +- if test $tcl_cv_cc_pipe = yes; then
255 +- CFLAGS="$CFLAGS -pipe"
256 +- fi
257 + fi
258 +
259 + #--------------------------------------------------------------------
260
261 diff --git a/dev-tcltk/tkimg/files/tkimg-1.4.7-tiff.patch b/dev-tcltk/tkimg/files/tkimg-1.4.7-tiff.patch
262 new file mode 100644
263 index 00000000000..39b97e92bea
264 --- /dev/null
265 +++ b/dev-tcltk/tkimg/files/tkimg-1.4.7-tiff.patch
266 @@ -0,0 +1,806 @@
267 + libtiff/Makefile.in | 6 +-
268 + libtiff/configure | 17 +--
269 + libtiff/configure.in | 2 +-
270 + libtiff/tifftclDecls.h | 368 ++++++++++++++++++++++------------------------
271 + libtiff/tifftclStubInit.c | 20 ++-
272 + tests/tiff.test | 6 +-
273 + tiff/configure | 2 +-
274 + tiff/tests/tiff.test | 6 +-
275 + tiff/tiff.c | 12 +-
276 + 9 files changed, 212 insertions(+), 227 deletions(-)
277 +
278 +diff --git a/libtiff/Makefile.in b/libtiff/Makefile.in
279 +index ebd81fc..08062b7 100644
280 +--- a/libtiff/Makefile.in
281 ++++ b/libtiff/Makefile.in
282 +@@ -35,8 +35,8 @@
283 +
284 + # tif_fax3sm is special. It is generated.
285 +
286 +-PKG_SOURCES = @PKG_SOURCES@ tif_fax3sm.c
287 +-PKG_OBJECTS = @PKG_OBJECTS@ tif_fax3sm.$(OBJEXT)
288 ++PKG_SOURCES = @PKG_SOURCES@
289 ++PKG_OBJECTS = @PKG_OBJECTS@
290 +
291 + PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
292 + PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
293 +@@ -109,7 +109,7 @@ RANLIB = @RANLIB@
294 + RANLIB_STUB = @RANLIB_STUB@
295 + SHLIB_CFLAGS = @SHLIB_CFLAGS@
296 + SHLIB_LD = @SHLIB_LD@
297 +-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
298 ++SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ -ltiff
299 + STLIB_LD = @STLIB_LD@
300 + TCL_DEFS = @TCL_DEFS@
301 + TCL_BIN_DIR = @TCL_BIN_DIR@
302 +diff --git a/libtiff/configure.in b/libtiff/configure.in
303 +index 4145e65..c7c8a2d 100644
304 +--- a/libtiff/configure.in
305 ++++ b/libtiff/configure.in
306 +@@ -81,20 +81,6 @@
307 +
308 + TEA_ADD_SOURCES([tifftcl.c tifftclStubInit.c])
309 +
310 +-TEA_ADD_SOURCES([
311 +- ../compat/libtiff/libtiff/tif_aux.c ../compat/libtiff/libtiff/tif_close.c ../compat/libtiff/libtiff/tif_codec.c
312 +- ../compat/libtiff/libtiff/tif_compress.c ../compat/libtiff/libtiff/tif_dir.c ../compat/libtiff/libtiff/tif_dirinfo.c
313 +- ../compat/libtiff/libtiff/tif_dirread.c ../compat/libtiff/libtiff/tif_dirwrite.c ../compat/libtiff/libtiff/tif_dumpmode.c
314 +- ../compat/libtiff/libtiff/tif_error.c ../compat/libtiff/libtiff/tif_fax3.c
315 +- ../compat/libtiff/libtiff/tif_getimage.c ../compat/libtiff/libtiff/tif_flush.c ../compat/libtiff/libtiff/tif_luv.c
316 +- ../compat/libtiff/libtiff/tif_lzw.c ../compat/libtiff/libtiff/tif_next.c ../compat/libtiff/libtiff/tif_open.c
317 +- ../compat/libtiff/libtiff/tif_packbits.c ../compat/libtiff/libtiff/tif_predict.c ../compat/libtiff/libtiff/tif_print.c
318 +- ../compat/libtiff/libtiff/tif_read.c ../compat/libtiff/libtiff/tif_swab.c ../compat/libtiff/libtiff/tif_strip.c
319 +- ../compat/libtiff/libtiff/tif_thunder.c ../compat/libtiff/libtiff/tif_tile.c ../compat/libtiff/libtiff/tif_version.c
320 +- ../compat/libtiff/libtiff/tif_warning.c ../compat/libtiff/libtiff/tif_write.c
321 +- ../compat/libtiff/libtiff/tif_color.c ../compat/libtiff/libtiff/tif_extension.c
322 +-])
323 +-
324 + TEA_ADD_HEADERS([tifftcl.h tifftclDecls.h])
325 + TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${srcdir}`\"])
326 + TEA_ADD_INCLUDES([-I\"./libtiff\"])
327 +@@ -118,7 +118,6 @@
328 + TEA_ADD_SOURCES([../compat/libtiff/libtiff/tif_win32.c])
329 + else
330 + CLEANFILES=""
331 +- TEA_ADD_SOURCES([../compat/libtiff/libtiff/tif_unix.c])
332 + fi
333 + AC_SUBST(CLEANFILES)
334 +
335 +diff --git a/libtiff/tifftclDecls.h b/libtiff/tifftclDecls.h
336 +index 1732cad..1c71857 100644
337 +--- a/libtiff/tifftclDecls.h
338 ++++ b/libtiff/tifftclDecls.h
339 +@@ -34,9 +34,13 @@ EXTERN int Tifftcl_SafeInit(Tcl_Interp *interp);
340 + */
341 + #undef INLINE
342 +
343 +-#include "../compat/libtiff/libtiff/tiffio.h"
344 +-#include "../compat/libtiff/libtiff/tiffiop.h"
345 +-#include "../compat/libtiff/libtiff/tif_predict.h"
346 ++#include <@GENTOO_PORTAGE_EPREFIX@/usr/include/tiffio.h>
347 ++
348 ++/*
349 ++ * Typedefs for ``method pointers'' used internally.
350 ++ */
351 ++typedef unsigned char tidataval_t; /* internal image data value type */
352 ++typedef tidataval_t* tidata_t; /* reference to internal image data */
353 +
354 + /* !BEGIN!: Do not edit below this line. */
355 +
356 +@@ -54,18 +58,18 @@ TIFFTCLAPI TIFFCodec * TIFFRegisterCODEC(uint16 a, const char *b,
357 + /* 3 */
358 + TIFFTCLAPI void TIFFUnRegisterCODEC(TIFFCodec *a);
359 + /* 4 */
360 +-TIFFTCLAPI tdata_t _TIFFmalloc(tsize_t a);
361 ++TIFFTCLAPI tdata_t _TIFFmalloc(tmsize_t a);
362 + /* 5 */
363 +-TIFFTCLAPI tdata_t _TIFFrealloc(tdata_t a, tsize_t b);
364 ++TIFFTCLAPI tdata_t _TIFFrealloc(void *a, tmsize_t b);
365 + /* 6 */
366 +-TIFFTCLAPI void _TIFFmemset(tdata_t a, int b, tsize_t c);
367 ++TIFFTCLAPI void _TIFFmemset(void *a, int b, tmsize_t c);
368 + /* 7 */
369 +-TIFFTCLAPI void _TIFFmemcpy(tdata_t a, const tdata_t b, tsize_t c);
370 ++TIFFTCLAPI void _TIFFmemcpy(void *a, const void *b, tmsize_t c);
371 + /* 8 */
372 +-TIFFTCLAPI int _TIFFmemcmp(const tdata_t a, const tdata_t b,
373 +- tsize_t c);
374 ++TIFFTCLAPI int _TIFFmemcmp(const void *a, const void *b,
375 ++ tmsize_t c);
376 + /* 9 */
377 +-TIFFTCLAPI void _TIFFfree(tdata_t a);
378 ++TIFFTCLAPI void _TIFFfree(void *a);
379 + /* 10 */
380 + TIFFTCLAPI void TIFFClose(TIFF *tiffptr);
381 + /* 11 */
382 +@@ -73,30 +77,30 @@ TIFFTCLAPI int TIFFFlush(TIFF *tiffptr);
383 + /* 12 */
384 + TIFFTCLAPI int TIFFFlushData(TIFF *tiffptr);
385 + /* 13 */
386 +-TIFFTCLAPI int TIFFGetField(TIFF *tiffptr, ttag_t a, ...);
387 ++TIFFTCLAPI int TIFFGetField(TIFF *tiffptr, uint32 a, ...);
388 + /* 14 */
389 +-TIFFTCLAPI int TIFFVGetField(TIFF *tiffptr, ttag_t a, va_list b);
390 ++TIFFTCLAPI int TIFFVGetField(TIFF *tiffptr, uint32 a, va_list b);
391 + /* 15 */
392 +-TIFFTCLAPI int TIFFGetFieldDefaulted(TIFF *tiffptr, ttag_t a, ...);
393 ++TIFFTCLAPI int TIFFGetFieldDefaulted(TIFF *tiffptr, uint32 a, ...);
394 + /* 16 */
395 +-TIFFTCLAPI int TIFFVGetFieldDefaulted(TIFF *tiffptr, ttag_t a,
396 ++TIFFTCLAPI int TIFFVGetFieldDefaulted(TIFF *tiffptr, uint32 a,
397 + va_list b);
398 + /* 17 */
399 + TIFFTCLAPI int TIFFReadDirectory(TIFF *tiffptr);
400 + /* 18 */
401 +-TIFFTCLAPI tsize_t TIFFScanlineSize(TIFF *tiffptr);
402 ++TIFFTCLAPI tmsize_t TIFFScanlineSize(TIFF *tiffptr);
403 + /* 19 */
404 +-TIFFTCLAPI tsize_t TIFFRasterScanlineSize(TIFF *tiffptr);
405 ++TIFFTCLAPI tmsize_t TIFFRasterScanlineSize(TIFF *tiffptr);
406 + /* 20 */
407 +-TIFFTCLAPI tsize_t TIFFStripSize(TIFF *tiffptr);
408 ++TIFFTCLAPI tmsize_t TIFFStripSize(TIFF *tiffptr);
409 + /* 21 */
410 +-TIFFTCLAPI tsize_t TIFFVStripSize(TIFF *tiffptr, uint32 a);
411 ++TIFFTCLAPI tmsize_t TIFFVStripSize(TIFF *tiffptr, uint32 a);
412 + /* 22 */
413 +-TIFFTCLAPI tsize_t TIFFTileRowSize(TIFF *tiffptr);
414 ++TIFFTCLAPI tmsize_t TIFFTileRowSize(TIFF *tiffptr);
415 + /* 23 */
416 +-TIFFTCLAPI tsize_t TIFFTileSize(TIFF *tiffptr);
417 ++TIFFTCLAPI tmsize_t TIFFTileSize(TIFF *tiffptr);
418 + /* 24 */
419 +-TIFFTCLAPI tsize_t TIFFVTileSize(TIFF *tiffptr, uint32 a);
420 ++TIFFTCLAPI tmsize_t TIFFVTileSize(TIFF *tiffptr, uint32 a);
421 + /* 25 */
422 + TIFFTCLAPI uint32 TIFFDefaultStripSize(TIFF *tiffptr, uint32 a);
423 + /* 26 */
424 +@@ -117,21 +121,21 @@ TIFFTCLAPI int TIFFIsMSB2LSB(TIFF *tiffptr);
425 + /* 33 */
426 + TIFFTCLAPI uint32 TIFFCurrentRow(TIFF *tiffptr);
427 + /* 34 */
428 +-TIFFTCLAPI tdir_t TIFFCurrentDirectory(TIFF *tiffptr);
429 ++TIFFTCLAPI uint16 TIFFCurrentDirectory(TIFF *tiffptr);
430 + /* 35 */
431 +-TIFFTCLAPI tdir_t TIFFNumberOfDirectories(TIFF *tiffptr);
432 ++TIFFTCLAPI uint16 TIFFNumberOfDirectories(TIFF *tiffptr);
433 + /* 36 */
434 +-TIFFTCLAPI uint32 TIFFCurrentDirOffset(TIFF *tiffptr);
435 ++TIFFTCLAPI uint64 TIFFCurrentDirOffset(TIFF *tiffptr);
436 + /* 37 */
437 +-TIFFTCLAPI tstrip_t TIFFCurrentStrip(TIFF *tiffptr);
438 ++TIFFTCLAPI uint32 TIFFCurrentStrip(TIFF *tiffptr);
439 + /* 38 */
440 +-TIFFTCLAPI ttile_t TIFFCurrentTile(TIFF *tiffptr);
441 ++TIFFTCLAPI uint32 TIFFCurrentTile(TIFF *tiffptr);
442 + /* 39 */
443 +-TIFFTCLAPI int TIFFReadBufferSetup(TIFF *tiffptr, tdata_t a,
444 +- tsize_t b);
445 ++TIFFTCLAPI int TIFFReadBufferSetup(TIFF *tiffptr, void *a,
446 ++ tmsize_t b);
447 + /* 40 */
448 +-TIFFTCLAPI int TIFFWriteBufferSetup(TIFF *tiffptr, tdata_t a,
449 +- tsize_t b);
450 ++TIFFTCLAPI int TIFFWriteBufferSetup(TIFF *tiffptr, void *a,
451 ++ tmsize_t b);
452 + /* 41 */
453 + TIFFTCLAPI int TIFFWriteCheck(TIFF *tiffptr, int a, const char *b);
454 + /* 42 */
455 +@@ -139,33 +143,31 @@ TIFFTCLAPI int TIFFCreateDirectory(TIFF *tiffptr);
456 + /* 43 */
457 + TIFFTCLAPI int TIFFLastDirectory(TIFF *tiffptr);
458 + /* 44 */
459 +-TIFFTCLAPI int TIFFSetDirectory(TIFF *tiffptr, tdir_t a);
460 ++TIFFTCLAPI int TIFFSetDirectory(TIFF *tiffptr, uint16 a);
461 + /* 45 */
462 +-TIFFTCLAPI int TIFFSetSubDirectory(TIFF *tiffptr, uint32 a);
463 ++TIFFTCLAPI int TIFFSetSubDirectory(TIFF *tiffptr, uint64 a);
464 + /* 46 */
465 +-TIFFTCLAPI int TIFFUnlinkDirectory(TIFF *tiffptr, tdir_t a);
466 ++TIFFTCLAPI int TIFFUnlinkDirectory(TIFF *tiffptr, uint16 a);
467 + /* 47 */
468 +-TIFFTCLAPI int TIFFSetField(TIFF *tiffptr, ttag_t a, ...);
469 ++TIFFTCLAPI int TIFFSetField(TIFF *tiffptr, uint32 a, ...);
470 + /* 48 */
471 +-TIFFTCLAPI int TIFFVSetField(TIFF *tiffptr, ttag_t a, va_list b);
472 ++TIFFTCLAPI int TIFFVSetField(TIFF *tiffptr, uint32 a, va_list b);
473 + /* 49 */
474 + TIFFTCLAPI int TIFFWriteDirectory(TIFF *tiffptr);
475 + /* 50 */
476 +-TIFFTCLAPI int TIFFReassignTagToIgnore(enum TIFFIgnoreSense a,
477 +- int b);
478 + /* 51 */
479 + TIFFTCLAPI void TIFFPrintDirectory(TIFF *tiffptr, FILE *a, long b);
480 + /* 52 */
481 +-TIFFTCLAPI int TIFFReadScanline(TIFF *tiffptr, tdata_t a, uint32 b,
482 +- tsample_t c);
483 ++TIFFTCLAPI int TIFFReadScanline(TIFF *tiffptr, void *a, uint32 b,
484 ++ uint16 c);
485 + /* 53 */
486 +-TIFFTCLAPI int TIFFWriteScanline(TIFF *tiffptr, tdata_t a, uint32 b,
487 +- tsample_t c);
488 ++TIFFTCLAPI int TIFFWriteScanline(TIFF *tiffptr, void *a, uint32 b,
489 ++ uint16 c);
490 + /* 54 */
491 + TIFFTCLAPI int TIFFReadRGBAImage(TIFF *tiffptr, uint32 a, uint32 b,
492 + uint32 *c, int d);
493 + /* 55 */
494 +-TIFFTCLAPI int TIFFReadRGBAStrip(TIFF *tiffptr, tstrip_t a,
495 ++TIFFTCLAPI int TIFFReadRGBAStrip(TIFF *tiffptr, uint32 a,
496 + uint32 *b);
497 + /* 56 */
498 + TIFFTCLAPI int TIFFReadRGBATile(TIFF *tiffptr, uint32 a, uint32 b,
499 +@@ -203,48 +205,48 @@ TIFFTCLAPI TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler a);
500 + /* 69 */
501 + TIFFTCLAPI TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc a);
502 + /* 70 */
503 +-TIFFTCLAPI ttile_t TIFFComputeTile(TIFF *tiffptr, uint32 a, uint32 b,
504 +- uint32 c, tsample_t d);
505 ++TIFFTCLAPI uint32 TIFFComputeTile(TIFF *tiffptr, uint32 a, uint32 b,
506 ++ uint32 c, uint16 d);
507 + /* 71 */
508 + TIFFTCLAPI int TIFFCheckTile(TIFF *tiffptr, uint32 d, uint32 c,
509 +- uint32 b, tsample_t a);
510 ++ uint32 b, uint16 a);
511 + /* 72 */
512 +-TIFFTCLAPI ttile_t TIFFNumberOfTiles(TIFF *tiffptr);
513 ++TIFFTCLAPI uint32 TIFFNumberOfTiles(TIFF *tiffptr);
514 + /* 73 */
515 +-TIFFTCLAPI tsize_t TIFFReadTile(TIFF *tiffptr, tdata_t a, uint32 b,
516 +- uint32 c, uint32 d, tsample_t e);
517 ++TIFFTCLAPI tmsize_t TIFFReadTile(TIFF *tiffptr, void *a, uint32 b,
518 ++ uint32 c, uint32 d, uint16 e);
519 + /* 74 */
520 +-TIFFTCLAPI tsize_t TIFFWriteTile(TIFF *tiffptr, tdata_t e, uint32 d,
521 +- uint32 c, uint32 b, tsample_t a);
522 ++TIFFTCLAPI tmsize_t TIFFWriteTile(TIFF *tiffptr, void *e, uint32 d,
523 ++ uint32 c, uint32 b, uint16 a);
524 + /* 75 */
525 +-TIFFTCLAPI tstrip_t TIFFComputeStrip(TIFF *tiffptr, uint32 a,
526 +- tsample_t b);
527 ++TIFFTCLAPI uint32 TIFFComputeStrip(TIFF *tiffptr, uint32 a,
528 ++ uint16 b);
529 + /* 76 */
530 +-TIFFTCLAPI tstrip_t TIFFNumberOfStrips(TIFF *tiffptr);
531 ++TIFFTCLAPI uint32 TIFFNumberOfStrips(TIFF *tiffptr);
532 + /* 77 */
533 +-TIFFTCLAPI tsize_t TIFFReadEncodedStrip(TIFF *tiffptr, tstrip_t a,
534 +- tdata_t b, tsize_t c);
535 ++TIFFTCLAPI tmsize_t TIFFReadEncodedStrip(TIFF *tiffptr, uint32 a,
536 ++ void *b, tmsize_t c);
537 + /* 78 */
538 +-TIFFTCLAPI tsize_t TIFFReadRawStrip(TIFF *tiffptr, tstrip_t a,
539 +- tdata_t b, tsize_t c);
540 ++TIFFTCLAPI tmsize_t TIFFReadRawStrip(TIFF *tiffptr, uint32 a,
541 ++ void *b, tmsize_t c);
542 + /* 79 */
543 +-TIFFTCLAPI tsize_t TIFFReadEncodedTile(TIFF *tiffptr, ttile_t a,
544 +- tdata_t b, tsize_t c);
545 ++TIFFTCLAPI tmsize_t TIFFReadEncodedTile(TIFF *tiffptr, uint32 a,
546 ++ void *b, tmsize_t c);
547 + /* 80 */
548 +-TIFFTCLAPI tsize_t TIFFReadRawTile(TIFF *tiffptr, ttile_t c, tdata_t b,
549 +- tsize_t a);
550 ++TIFFTCLAPI tmsize_t TIFFReadRawTile(TIFF *tiffptr, uint32 c, void *b,
551 ++ tmsize_t a);
552 + /* 81 */
553 +-TIFFTCLAPI tsize_t TIFFWriteEncodedStrip(TIFF *tiffptr, tstrip_t a,
554 +- tdata_t b, tsize_t c);
555 ++TIFFTCLAPI tmsize_t TIFFWriteEncodedStrip(TIFF *tiffptr, uint32 a,
556 ++ void *b, tmsize_t c);
557 + /* 82 */
558 +-TIFFTCLAPI tsize_t TIFFWriteRawStrip(TIFF *tiffptr, tstrip_t a,
559 +- tdata_t b, tsize_t c);
560 ++TIFFTCLAPI tmsize_t TIFFWriteRawStrip(TIFF *tiffptr, uint32 a,
561 ++ void *b, tmsize_t c);
562 + /* 83 */
563 +-TIFFTCLAPI tsize_t TIFFWriteEncodedTile(TIFF *tiffptr, ttile_t a,
564 +- tdata_t b, tsize_t c);
565 ++TIFFTCLAPI tmsize_t TIFFWriteEncodedTile(TIFF *tiffptr, uint32 a,
566 ++ void *b, tmsize_t c);
567 + /* 84 */
568 +-TIFFTCLAPI tsize_t TIFFWriteRawTile(TIFF *tiffptr, ttile_t c, tdata_t b,
569 +- tsize_t a);
570 ++TIFFTCLAPI tmsize_t TIFFWriteRawTile(TIFF *tiffptr, uint32 c, void *b,
571 ++ tmsize_t a);
572 + /* 85 */
573 + TIFFTCLAPI void TIFFSetWriteOffset(TIFF *tiffptr, toff_t a);
574 + /* 86 */
575 +@@ -254,13 +256,13 @@ TIFFTCLAPI void TIFFSwabLong(uint32 *a);
576 + /* 88 */
577 + TIFFTCLAPI void TIFFSwabDouble(double *a);
578 + /* 89 */
579 +-TIFFTCLAPI void TIFFSwabArrayOfShort(uint16 *a, unsigned long b);
580 ++TIFFTCLAPI void TIFFSwabArrayOfShort(uint16 *a, tmsize_t b);
581 + /* 90 */
582 +-TIFFTCLAPI void TIFFSwabArrayOfLong(uint32 *b, unsigned long a);
583 ++TIFFTCLAPI void TIFFSwabArrayOfLong(uint32 *b, tmsize_t a);
584 + /* 91 */
585 +-TIFFTCLAPI void TIFFSwabArrayOfDouble(double *a, unsigned long b);
586 ++TIFFTCLAPI void TIFFSwabArrayOfDouble(double *a, tmsize_t b);
587 + /* 92 */
588 +-TIFFTCLAPI void TIFFReverseBits(unsigned char *a, unsigned long b);
589 ++TIFFTCLAPI void TIFFReverseBits(uint8 *a, tmsize_t b);
590 + /* 93 */
591 + TIFFTCLAPI const unsigned char * TIFFGetBitRevTable(int a);
592 + /* Slot 94 is reserved */
593 +@@ -269,8 +271,6 @@ TIFFTCLAPI const unsigned char * TIFFGetBitRevTable(int a);
594 + /* Slot 97 is reserved */
595 + /* Slot 98 is reserved */
596 + /* Slot 99 is reserved */
597 +-/* 100 */
598 +-TIFFTCLAPI int TIFFPredictorInit(TIFF *tiffptr);
599 + /* Slot 101 is reserved */
600 + /* Slot 102 is reserved */
601 + /* Slot 103 is reserved */
602 +@@ -281,20 +281,13 @@ TIFFTCLAPI int TIFFPredictorInit(TIFF *tiffptr);
603 + /* Slot 108 is reserved */
604 + /* Slot 109 is reserved */
605 + /* 110 */
606 +-TIFFTCLAPI void _TIFFSetupFieldInfo(TIFF *tiffptr,
607 +- const TIFFFieldInfo a[], size_t b);
608 + /* 111 */
609 +-TIFFTCLAPI int _TIFFMergeFieldInfo(TIFF *tiffptr,
610 +- const TIFFFieldInfo *a, int b);
611 + /* 112 */
612 + TIFFTCLAPI void _TIFFPrintFieldInfo(TIFF *tiffptr, FILE *a);
613 + /* 113 */
614 +-TIFFTCLAPI const TIFFFieldInfo * TIFFFindFieldInfo(TIFF *tiffptr, ttag_t a,
615 +- TIFFDataType b);
616 + /* 114 */
617 +-TIFFTCLAPI const TIFFFieldInfo * TIFFFieldWithTag(TIFF *tiffptr, ttag_t a);
618 ++TIFFTCLAPI const TIFFField * TIFFFieldWithTag(TIFF *tiffptr, uint32 a);
619 + /* 115 */
620 +-TIFFTCLAPI TIFFDataType _TIFFSampleToTagType(TIFF *tiffptr);
621 + /* Slot 116 is reserved */
622 + /* Slot 117 is reserved */
623 + /* Slot 118 is reserved */
624 +@@ -302,43 +295,42 @@ TIFFTCLAPI TIFFDataType _TIFFSampleToTagType(TIFF *tiffptr);
625 + /* 120 */
626 + TIFFTCLAPI int _TIFFgetMode(const char *a, const char *b);
627 + /* 121 */
628 +-TIFFTCLAPI int _TIFFNoRowEncode(TIFF *tiffptr, tidata_t a,
629 +- tsize_t b, tsample_t c);
630 ++TIFFTCLAPI int _TIFFNoRowEncode(TIFF *tiffptr, uint8 *a,
631 ++ tmsize_t b, uint16 c);
632 + /* 122 */
633 +-TIFFTCLAPI int _TIFFNoStripEncode(TIFF *tiffptr, tidata_t c,
634 +- tsize_t b, tsample_t a);
635 ++TIFFTCLAPI int _TIFFNoStripEncode(TIFF *tiffptr, uint8 *c,
636 ++ tmsize_t b, uint16 a);
637 + /* 123 */
638 +-TIFFTCLAPI int _TIFFNoTileEncode(TIFF *tiffptr, tidata_t a,
639 +- tsize_t b, tsample_t c);
640 ++TIFFTCLAPI int _TIFFNoTileEncode(TIFF *tiffptr, uint8 *a,
641 ++ tmsize_t b, uint16 c);
642 + /* 124 */
643 +-TIFFTCLAPI int _TIFFNoRowDecode(TIFF *tiffptr, tidata_t c,
644 +- tsize_t b, tsample_t a);
645 ++TIFFTCLAPI int _TIFFNoRowDecode(TIFF *tiffptr, uint8 *c,
646 ++ tmsize_t b, uint16 a);
647 + /* 125 */
648 +-TIFFTCLAPI int _TIFFNoStripDecode(TIFF *tiffptr, tidata_t a,
649 +- tsize_t b, tsample_t c);
650 ++TIFFTCLAPI int _TIFFNoStripDecode(TIFF *tiffptr, uint8 *a,
651 ++ tmsize_t b, uint16 c);
652 + /* 126 */
653 +-TIFFTCLAPI int _TIFFNoTileDecode(TIFF *tiffptr, tidata_t c,
654 +- tsize_t b, tsample_t a);
655 ++TIFFTCLAPI int _TIFFNoTileDecode(TIFF *tiffptr, uint8 *c,
656 ++ tmsize_t b, uint16 a);
657 + /* 127 */
658 +-TIFFTCLAPI void _TIFFNoPostDecode(TIFF *tiffptr, tidata_t a,
659 +- tsize_t b);
660 ++TIFFTCLAPI void _TIFFNoPostDecode(TIFF *tiffptr, uint8 *a,
661 ++ tmsize_t b);
662 + /* 128 */
663 +-TIFFTCLAPI int _TIFFNoPreCode(TIFF *tiffptr, tsample_t a);
664 ++TIFFTCLAPI int _TIFFNoPreCode(TIFF *tiffptr, uint16 a);
665 + /* 129 */
666 + TIFFTCLAPI int _TIFFNoSeek(TIFF *tiffptr, uint32 a);
667 + /* 130 */
668 +-TIFFTCLAPI void _TIFFSwab16BitData(TIFF *tiffptr, tidata_t a,
669 +- tsize_t b);
670 ++TIFFTCLAPI void _TIFFSwab16BitData(TIFF *tiffptr, uint8 *a,
671 ++ tmsize_t b);
672 + /* 131 */
673 +-TIFFTCLAPI void _TIFFSwab32BitData(TIFF *tiffptr, tidata_t b,
674 +- tsize_t a);
675 ++TIFFTCLAPI void _TIFFSwab32BitData(TIFF *tiffptr, uint8 *b,
676 ++ tmsize_t a);
677 + /* 132 */
678 +-TIFFTCLAPI void _TIFFSwab64BitData(TIFF *tiffptr, tidata_t a,
679 +- tsize_t b);
680 ++TIFFTCLAPI void _TIFFSwab64BitData(TIFF *tiffptr, uint8 *a,
681 ++ tmsize_t b);
682 + /* 133 */
683 + TIFFTCLAPI int TIFFFlushData1(TIFF *tiffptr);
684 + /* 134 */
685 +-TIFFTCLAPI void TIFFFreeDirectory(TIFF *tiffptr);
686 + /* 135 */
687 + TIFFTCLAPI int TIFFDefaultDirectory(TIFF *tiffptr);
688 + /* 136 */
689 +@@ -397,6 +389,8 @@ TIFFTCLAPI int TIFFInitZIP(TIFF *tiffptr, int a);
690 + TIFFTCLAPI int TIFFInitPixarLog(TIFF *tiffptr, int a);
691 + /* 162 */
692 + TIFFTCLAPI int TIFFInitSGILog(TIFF *tiffptr, int a);
693 ++/* 163 */
694 ++TIFFTCLAPI int TIFFInitLZMA(TIFF *tiffptr, int a);
695 +
696 + typedef struct TifftclStubs {
697 + int magic;
698 +@@ -406,27 +400,27 @@ typedef struct TifftclStubs {
699 + const TIFFCodec * (*tIFFFindCODEC) (uint16 a); /* 1 */
700 + TIFFCodec * (*tIFFRegisterCODEC) (uint16 a, const char *b, TIFFInitMethod c); /* 2 */
701 + void (*tIFFUnRegisterCODEC) (TIFFCodec *a); /* 3 */
702 +- tdata_t (*_TIFFmallocPtr) (tsize_t a); /* 4 */
703 +- tdata_t (*_TIFFreallocPtr) (tdata_t a, tsize_t b); /* 5 */
704 +- void (*_TIFFmemsetPtr) (tdata_t a, int b, tsize_t c); /* 6 */
705 +- void (*_TIFFmemcpyPtr) (tdata_t a, const tdata_t b, tsize_t c); /* 7 */
706 +- int (*_TIFFmemcmpPtr) (const tdata_t a, const tdata_t b, tsize_t c); /* 8 */
707 +- void (*_TIFFfreePtr) (tdata_t a); /* 9 */
708 ++ tdata_t (*_TIFFmallocPtr) (tmsize_t a); /* 4 */
709 ++ tdata_t (*_TIFFreallocPtr) (void *a, tmsize_t b); /* 5 */
710 ++ void (*_TIFFmemsetPtr) (void *a, int b, tmsize_t c); /* 6 */
711 ++ void (*_TIFFmemcpyPtr) (void *a, const void *b, tmsize_t c); /* 7 */
712 ++ int (*_TIFFmemcmpPtr) (const void *a, const void *b, tmsize_t c); /* 8 */
713 ++ void (*_TIFFfreePtr) (void *a); /* 9 */
714 + void (*tIFFClose) (TIFF *tiffptr); /* 10 */
715 + int (*tIFFFlush) (TIFF *tiffptr); /* 11 */
716 + int (*tIFFFlushData) (TIFF *tiffptr); /* 12 */
717 +- int (*tIFFGetField) (TIFF *tiffptr, ttag_t a, ...); /* 13 */
718 +- int (*tIFFVGetField) (TIFF *tiffptr, ttag_t a, va_list b); /* 14 */
719 +- int (*tIFFGetFieldDefaulted) (TIFF *tiffptr, ttag_t a, ...); /* 15 */
720 +- int (*tIFFVGetFieldDefaulted) (TIFF *tiffptr, ttag_t a, va_list b); /* 16 */
721 ++ int (*tIFFGetField) (TIFF *tiffptr, uint32 a, ...); /* 13 */
722 ++ int (*tIFFVGetField) (TIFF *tiffptr, uint32 a, va_list b); /* 14 */
723 ++ int (*tIFFGetFieldDefaulted) (TIFF *tiffptr, uint32 a, ...); /* 15 */
724 ++ int (*tIFFVGetFieldDefaulted) (TIFF *tiffptr, uint32 a, va_list b); /* 16 */
725 + int (*tIFFReadDirectory) (TIFF *tiffptr); /* 17 */
726 +- tsize_t (*tIFFScanlineSize) (TIFF *tiffptr); /* 18 */
727 +- tsize_t (*tIFFRasterScanlineSize) (TIFF *tiffptr); /* 19 */
728 +- tsize_t (*tIFFStripSize) (TIFF *tiffptr); /* 20 */
729 +- tsize_t (*tIFFVStripSize) (TIFF *tiffptr, uint32 a); /* 21 */
730 +- tsize_t (*tIFFTileRowSize) (TIFF *tiffptr); /* 22 */
731 +- tsize_t (*tIFFTileSize) (TIFF *tiffptr); /* 23 */
732 +- tsize_t (*tIFFVTileSize) (TIFF *tiffptr, uint32 a); /* 24 */
733 ++ tmsize_t (*tIFFScanlineSize) (TIFF *tiffptr); /* 18 */
734 ++ tmsize_t (*tIFFRasterScanlineSize) (TIFF *tiffptr); /* 19 */
735 ++ tmsize_t (*tIFFStripSize) (TIFF *tiffptr); /* 20 */
736 ++ tmsize_t (*tIFFVStripSize) (TIFF *tiffptr, uint32 a); /* 21 */
737 ++ tmsize_t (*tIFFTileRowSize) (TIFF *tiffptr); /* 22 */
738 ++ tmsize_t (*tIFFTileSize) (TIFF *tiffptr); /* 23 */
739 ++ tmsize_t (*tIFFVTileSize) (TIFF *tiffptr, uint32 a); /* 24 */
740 + uint32 (*tIFFDefaultStripSize) (TIFF *tiffptr, uint32 a); /* 25 */
741 + void (*tIFFDefaultTileSize) (TIFF *tiffptr, uint32 *a, uint32 *b); /* 26 */
742 + int (*tIFFFileno) (TIFF *tiffptr); /* 27 */
743 +@@ -436,28 +430,28 @@ typedef struct TifftclStubs {
744 + int (*tIFFIsUpSampled) (TIFF *tiffptr); /* 31 */
745 + int (*tIFFIsMSB2LSB) (TIFF *tiffptr); /* 32 */
746 + uint32 (*tIFFCurrentRow) (TIFF *tiffptr); /* 33 */
747 +- tdir_t (*tIFFCurrentDirectory) (TIFF *tiffptr); /* 34 */
748 +- tdir_t (*tIFFNumberOfDirectories) (TIFF *tiffptr); /* 35 */
749 +- uint32 (*tIFFCurrentDirOffset) (TIFF *tiffptr); /* 36 */
750 +- tstrip_t (*tIFFCurrentStrip) (TIFF *tiffptr); /* 37 */
751 +- ttile_t (*tIFFCurrentTile) (TIFF *tiffptr); /* 38 */
752 +- int (*tIFFReadBufferSetup) (TIFF *tiffptr, tdata_t a, tsize_t b); /* 39 */
753 +- int (*tIFFWriteBufferSetup) (TIFF *tiffptr, tdata_t a, tsize_t b); /* 40 */
754 ++ uint16 (*tIFFCurrentDirectory) (TIFF *tiffptr); /* 34 */
755 ++ uint16 (*tIFFNumberOfDirectories) (TIFF *tiffptr); /* 35 */
756 ++ uint64 (*tIFFCurrentDirOffset) (TIFF *tiffptr); /* 36 */
757 ++ uint32 (*tIFFCurrentStrip) (TIFF *tiffptr); /* 37 */
758 ++ uint32 (*tIFFCurrentTile) (TIFF *tiffptr); /* 38 */
759 ++ int (*tIFFReadBufferSetup) (TIFF *tiffptr, void *a, tmsize_t b); /* 39 */
760 ++ int (*tIFFWriteBufferSetup) (TIFF *tiffptr, void *a, tmsize_t b); /* 40 */
761 + int (*tIFFWriteCheck) (TIFF *tiffptr, int a, const char *b); /* 41 */
762 + int (*tIFFCreateDirectory) (TIFF *tiffptr); /* 42 */
763 + int (*tIFFLastDirectory) (TIFF *tiffptr); /* 43 */
764 +- int (*tIFFSetDirectory) (TIFF *tiffptr, tdir_t a); /* 44 */
765 +- int (*tIFFSetSubDirectory) (TIFF *tiffptr, uint32 a); /* 45 */
766 +- int (*tIFFUnlinkDirectory) (TIFF *tiffptr, tdir_t a); /* 46 */
767 +- int (*tIFFSetField) (TIFF *tiffptr, ttag_t a, ...); /* 47 */
768 +- int (*tIFFVSetField) (TIFF *tiffptr, ttag_t a, va_list b); /* 48 */
769 ++ int (*tIFFSetDirectory) (TIFF *tiffptr, uint16 a); /* 44 */
770 ++ int (*tIFFSetSubDirectory) (TIFF *tiffptr, uint64 a); /* 45 */
771 ++ int (*tIFFUnlinkDirectory) (TIFF *tiffptr, uint16 a); /* 46 */
772 ++ int (*tIFFSetField) (TIFF *tiffptr, uint32 a, ...); /* 47 */
773 ++ int (*tIFFVSetField) (TIFF *tiffptr, uint32 a, va_list b); /* 48 */
774 + int (*tIFFWriteDirectory) (TIFF *tiffptr); /* 49 */
775 +- int (*tIFFReassignTagToIgnore) (enum TIFFIgnoreSense a, int b); /* 50 */
776 ++ void (*reserved50)(void);
777 + void (*tIFFPrintDirectory) (TIFF *tiffptr, FILE *a, long b); /* 51 */
778 +- int (*tIFFReadScanline) (TIFF *tiffptr, tdata_t a, uint32 b, tsample_t c); /* 52 */
779 +- int (*tIFFWriteScanline) (TIFF *tiffptr, tdata_t a, uint32 b, tsample_t c); /* 53 */
780 ++ int (*tIFFReadScanline) (TIFF *tiffptr, void *a, uint32 b, uint16 c); /* 52 */
781 ++ int (*tIFFWriteScanline) (TIFF *tiffptr, void *a, uint32 b, uint16 c); /* 53 */
782 + int (*tIFFReadRGBAImage) (TIFF *tiffptr, uint32 a, uint32 b, uint32 *c, int d); /* 54 */
783 +- int (*tIFFReadRGBAStrip) (TIFF *tiffptr, tstrip_t a, uint32 *b); /* 55 */
784 ++ int (*tIFFReadRGBAStrip) (TIFF *tiffptr, uint32 a, uint32 *b); /* 55 */
785 + int (*tIFFReadRGBATile) (TIFF *tiffptr, uint32 a, uint32 b, uint32 *c); /* 56 */
786 + int (*tIFFRGBAImageOK) (TIFF *tiffptr, char *a); /* 57 */
787 + int (*tIFFRGBAImageBegin) (TIFFRGBAImage *a, TIFF *tiffptr, int b, char *c); /* 58 */
788 +@@ -472,29 +466,29 @@ typedef struct TifftclStubs {
789 + TIFFErrorHandler (*tIFFSetErrorHandler) (TIFFErrorHandler a); /* 67 */
790 + TIFFErrorHandler (*tIFFSetWarningHandler) (TIFFErrorHandler a); /* 68 */
791 + TIFFExtendProc (*tIFFSetTagExtender) (TIFFExtendProc a); /* 69 */
792 +- ttile_t (*tIFFComputeTile) (TIFF *tiffptr, uint32 a, uint32 b, uint32 c, tsample_t d); /* 70 */
793 +- int (*tIFFCheckTile) (TIFF *tiffptr, uint32 d, uint32 c, uint32 b, tsample_t a); /* 71 */
794 +- ttile_t (*tIFFNumberOfTiles) (TIFF *tiffptr); /* 72 */
795 +- tsize_t (*tIFFReadTile) (TIFF *tiffptr, tdata_t a, uint32 b, uint32 c, uint32 d, tsample_t e); /* 73 */
796 +- tsize_t (*tIFFWriteTile) (TIFF *tiffptr, tdata_t e, uint32 d, uint32 c, uint32 b, tsample_t a); /* 74 */
797 +- tstrip_t (*tIFFComputeStrip) (TIFF *tiffptr, uint32 a, tsample_t b); /* 75 */
798 +- tstrip_t (*tIFFNumberOfStrips) (TIFF *tiffptr); /* 76 */
799 +- tsize_t (*tIFFReadEncodedStrip) (TIFF *tiffptr, tstrip_t a, tdata_t b, tsize_t c); /* 77 */
800 +- tsize_t (*tIFFReadRawStrip) (TIFF *tiffptr, tstrip_t a, tdata_t b, tsize_t c); /* 78 */
801 +- tsize_t (*tIFFReadEncodedTile) (TIFF *tiffptr, ttile_t a, tdata_t b, tsize_t c); /* 79 */
802 +- tsize_t (*tIFFReadRawTile) (TIFF *tiffptr, ttile_t c, tdata_t b, tsize_t a); /* 80 */
803 +- tsize_t (*tIFFWriteEncodedStrip) (TIFF *tiffptr, tstrip_t a, tdata_t b, tsize_t c); /* 81 */
804 +- tsize_t (*tIFFWriteRawStrip) (TIFF *tiffptr, tstrip_t a, tdata_t b, tsize_t c); /* 82 */
805 +- tsize_t (*tIFFWriteEncodedTile) (TIFF *tiffptr, ttile_t a, tdata_t b, tsize_t c); /* 83 */
806 +- tsize_t (*tIFFWriteRawTile) (TIFF *tiffptr, ttile_t c, tdata_t b, tsize_t a); /* 84 */
807 ++ uint32 (*tIFFComputeTile) (TIFF *tiffptr, uint32 a, uint32 b, uint32 c, uint16 d); /* 70 */
808 ++ int (*tIFFCheckTile) (TIFF *tiffptr, uint32 d, uint32 c, uint32 b, uint16 a); /* 71 */
809 ++ uint32 (*tIFFNumberOfTiles) (TIFF *tiffptr); /* 72 */
810 ++ tmsize_t (*tIFFReadTile) (TIFF *tiffptr, void *a, uint32 b, uint32 c, uint32 d, uint16 e); /* 73 */
811 ++ tmsize_t (*tIFFWriteTile) (TIFF *tiffptr, void *e, uint32 d, uint32 c, uint32 b, uint16 a); /* 74 */
812 ++ uint32 (*tIFFComputeStrip) (TIFF *tiffptr, uint32 a, uint16 b); /* 75 */
813 ++ uint32 (*tIFFNumberOfStrips) (TIFF *tiffptr); /* 76 */
814 ++ tmsize_t (*tIFFReadEncodedStrip) (TIFF *tiffptr, uint32 a, void *b, tmsize_t c); /* 77 */
815 ++ tmsize_t (*tIFFReadRawStrip) (TIFF *tiffptr, uint32 a, void *b, tmsize_t c); /* 78 */
816 ++ tmsize_t (*tIFFReadEncodedTile) (TIFF *tiffptr, uint32 a, void *b, tmsize_t c); /* 79 */
817 ++ tmsize_t (*tIFFReadRawTile) (TIFF *tiffptr, uint32 c, void *b, tmsize_t a); /* 80 */
818 ++ tmsize_t (*tIFFWriteEncodedStrip) (TIFF *tiffptr, uint32 a, void *b, tmsize_t c); /* 81 */
819 ++ tmsize_t (*tIFFWriteRawStrip) (TIFF *tiffptr, uint32 a, void *b, tmsize_t c); /* 82 */
820 ++ tmsize_t (*tIFFWriteEncodedTile) (TIFF *tiffptr, uint32 a, void *b, tmsize_t c); /* 83 */
821 ++ tmsize_t (*tIFFWriteRawTile) (TIFF *tiffptr, uint32 c, void *b, tmsize_t a); /* 84 */
822 + void (*tIFFSetWriteOffset) (TIFF *tiffptr, toff_t a); /* 85 */
823 + void (*tIFFSwabShort) (uint16 *a); /* 86 */
824 + void (*tIFFSwabLong) (uint32 *a); /* 87 */
825 + void (*tIFFSwabDouble) (double *a); /* 88 */
826 +- void (*tIFFSwabArrayOfShort) (uint16 *a, unsigned long b); /* 89 */
827 +- void (*tIFFSwabArrayOfLong) (uint32 *b, unsigned long a); /* 90 */
828 +- void (*tIFFSwabArrayOfDouble) (double *a, unsigned long b); /* 91 */
829 +- void (*tIFFReverseBits) (unsigned char *a, unsigned long b); /* 92 */
830 ++ void (*tIFFSwabArrayOfShort) (uint16 *a, tmsize_t b); /* 89 */
831 ++ void (*tIFFSwabArrayOfLong) (uint32 *b, tmsize_t a); /* 90 */
832 ++ void (*tIFFSwabArrayOfDouble) (double *a, tmsize_t b); /* 91 */
833 ++ void (*tIFFReverseBits) (unsigned char *a, tmsize_t b); /* 92 */
834 + const unsigned char * (*tIFFGetBitRevTable) (int a); /* 93 */
835 + void (*reserved94)(void);
836 + void (*reserved95)(void);
837 +@@ -502,7 +496,7 @@ typedef struct TifftclStubs {
838 + void (*reserved97)(void);
839 + void (*reserved98)(void);
840 + void (*reserved99)(void);
841 +- int (*tIFFPredictorInit) (TIFF *tiffptr); /* 100 */
842 ++ void (*reserved100)(void);
843 + void (*reserved101)(void);
844 + void (*reserved102)(void);
845 + void (*reserved103)(void);
846 +@@ -512,31 +506,31 @@ typedef struct TifftclStubs {
847 + void (*reserved107)(void);
848 + void (*reserved108)(void);
849 + void (*reserved109)(void);
850 +- void (*_TIFFSetupFieldInfoPtr) (TIFF *tiffptr, const TIFFFieldInfo a[], size_t b); /* 110 */
851 +- int (*_TIFFMergeFieldInfoPtr) (TIFF *tiffptr, const TIFFFieldInfo *a, int b); /* 111 */
852 ++ void (*reserved110)(void);
853 ++ void (*reserved111)(void);
854 + void (*_TIFFPrintFieldInfoPtr) (TIFF *tiffptr, FILE *a); /* 112 */
855 +- const TIFFFieldInfo * (*tIFFFindFieldInfo) (TIFF *tiffptr, ttag_t a, TIFFDataType b); /* 113 */
856 +- const TIFFFieldInfo * (*tIFFFieldWithTag) (TIFF *tiffptr, ttag_t a); /* 114 */
857 +- TIFFDataType (*_TIFFSampleToTagTypePtr) (TIFF *tiffptr); /* 115 */
858 ++ void (*reserved113)(void);
859 ++ const TIFFField * (*tIFFFieldWithTag) (TIFF *tiffptr, uint32 a); /* 114 */
860 ++ void (*reserved115)(void);
861 + void (*reserved116)(void);
862 + void (*reserved117)(void);
863 + void (*reserved118)(void);
864 + void (*reserved119)(void);
865 + int (*_TIFFgetModePtr) (const char *a, const char *b); /* 120 */
866 +- int (*_TIFFNoRowEncodePtr) (TIFF *tiffptr, tidata_t a, tsize_t b, tsample_t c); /* 121 */
867 +- int (*_TIFFNoStripEncodePtr) (TIFF *tiffptr, tidata_t c, tsize_t b, tsample_t a); /* 122 */
868 +- int (*_TIFFNoTileEncodePtr) (TIFF *tiffptr, tidata_t a, tsize_t b, tsample_t c); /* 123 */
869 +- int (*_TIFFNoRowDecodePtr) (TIFF *tiffptr, tidata_t c, tsize_t b, tsample_t a); /* 124 */
870 +- int (*_TIFFNoStripDecodePtr) (TIFF *tiffptr, tidata_t a, tsize_t b, tsample_t c); /* 125 */
871 +- int (*_TIFFNoTileDecodePtr) (TIFF *tiffptr, tidata_t c, tsize_t b, tsample_t a); /* 126 */
872 +- void (*_TIFFNoPostDecodePtr) (TIFF *tiffptr, tidata_t a, tsize_t b); /* 127 */
873 +- int (*_TIFFNoPreCodePtr) (TIFF *tiffptr, tsample_t a); /* 128 */
874 ++ int (*_TIFFNoRowEncodePtr) (TIFF *tiffptr, uint8 *a, tmsize_t b, uint16 c); /* 121 */
875 ++ int (*_TIFFNoStripEncodePtr) (TIFF *tiffptr, uint8 *c, tmsize_t b, uint16 a); /* 122 */
876 ++ int (*_TIFFNoTileEncodePtr) (TIFF *tiffptr, uint8 *a, tmsize_t b, uint16 c); /* 123 */
877 ++ int (*_TIFFNoRowDecodePtr) (TIFF *tiffptr, uint8 *c, tmsize_t b, uint16 a); /* 124 */
878 ++ int (*_TIFFNoStripDecodePtr) (TIFF *tiffptr, uint8 *a, tmsize_t b, uint16 c); /* 125 */
879 ++ int (*_TIFFNoTileDecodePtr) (TIFF *tiffptr, uint8 *c, tmsize_t b, uint16 a); /* 126 */
880 ++ void (*_TIFFNoPostDecodePtr) (TIFF *tiffptr, uint8 *a, tmsize_t b); /* 127 */
881 ++ int (*_TIFFNoPreCodePtr) (TIFF *tiffptr, uint16 a); /* 128 */
882 + int (*_TIFFNoSeekPtr) (TIFF *tiffptr, uint32 a); /* 129 */
883 +- void (*_TIFFSwab16BitDataPtr) (TIFF *tiffptr, tidata_t a, tsize_t b); /* 130 */
884 +- void (*_TIFFSwab32BitDataPtr) (TIFF *tiffptr, tidata_t b, tsize_t a); /* 131 */
885 +- void (*_TIFFSwab64BitDataPtr) (TIFF *tiffptr, tidata_t a, tsize_t b); /* 132 */
886 ++ void (*_TIFFSwab16BitDataPtr) (TIFF *tiffptr, uint8 *a, tmsize_t b); /* 130 */
887 ++ void (*_TIFFSwab32BitDataPtr) (TIFF *tiffptr, uint8 *b, tmsize_t a); /* 131 */
888 ++ void (*_TIFFSwab64BitDataPtr) (TIFF *tiffptr, uint8 *a, tmsize_t b); /* 132 */
889 + int (*tIFFFlushData1) (TIFF *tiffptr); /* 133 */
890 +- void (*tIFFFreeDirectory) (TIFF *tiffptr); /* 134 */
891 ++ void (*reserved134)(void);
892 + int (*tIFFDefaultDirectory) (TIFF *tiffptr); /* 135 */
893 + int (*tIFFSetCompressionScheme) (TIFF *tiffptr, int a); /* 136 */
894 + void (*_TIFFSetDefaultCompressionStatePtr) (TIFF *tiffptr); /* 137 */
895 +@@ -565,6 +559,7 @@ typedef struct TifftclStubs {
896 + int (*tIFFInitZIP) (TIFF *tiffptr, int a); /* 160 */
897 + int (*tIFFInitPixarLog) (TIFF *tiffptr, int a); /* 161 */
898 + int (*tIFFInitSGILog) (TIFF *tiffptr, int a); /* 162 */
899 ++ int (*tIFFInitLZMA) (TIFF *tiffptr, int a); /* 163 */
900 + } TifftclStubs;
901 +
902 + #ifdef __cplusplus
903 +@@ -681,8 +676,7 @@ TIFFTCLAPI const TifftclStubs *tifftclStubsPtr;
904 + (tifftclStubsPtr->tIFFVSetField) /* 48 */
905 + #define TIFFWriteDirectory \
906 + (tifftclStubsPtr->tIFFWriteDirectory) /* 49 */
907 +-#define TIFFReassignTagToIgnore \
908 +- (tifftclStubsPtr->tIFFReassignTagToIgnore) /* 50 */
909 ++/* Slot 50 is reserved */
910 + #define TIFFPrintDirectory \
911 + (tifftclStubsPtr->tIFFPrintDirectory) /* 51 */
912 + #define TIFFReadScanline \
913 +@@ -775,8 +769,7 @@ TIFFTCLAPI const TifftclStubs *tifftclStubsPtr;
914 + /* Slot 97 is reserved */
915 + /* Slot 98 is reserved */
916 + /* Slot 99 is reserved */
917 +-#define TIFFPredictorInit \
918 +- (tifftclStubsPtr->tIFFPredictorInit) /* 100 */
919 ++/* Slot 100 is reserved */
920 + /* Slot 101 is reserved */
921 + /* Slot 102 is reserved */
922 + /* Slot 103 is reserved */
923 +@@ -786,18 +779,14 @@ TIFFTCLAPI const TifftclStubs *tifftclStubsPtr;
924 + /* Slot 107 is reserved */
925 + /* Slot 108 is reserved */
926 + /* Slot 109 is reserved */
927 +-#define _TIFFSetupFieldInfo \
928 +- (tifftclStubsPtr->_TIFFSetupFieldInfoPtr) /* 110 */
929 +-#define _TIFFMergeFieldInfo \
930 +- (tifftclStubsPtr->_TIFFMergeFieldInfoPtr) /* 111 */
931 ++/* Slot 110 is reserved */
932 ++/* Slot 111 is reserved */
933 + #define _TIFFPrintFieldInfo \
934 + (tifftclStubsPtr->_TIFFPrintFieldInfoPtr) /* 112 */
935 +-#define TIFFFindFieldInfo \
936 +- (tifftclStubsPtr->tIFFFindFieldInfo) /* 113 */
937 ++/* Slot 113 is reserved */
938 + #define TIFFFieldWithTag \
939 + (tifftclStubsPtr->tIFFFieldWithTag) /* 114 */
940 +-#define _TIFFSampleToTagType \
941 +- (tifftclStubsPtr->_TIFFSampleToTagTypePtr) /* 115 */
942 ++/* Slot 115 is reserved */
943 + /* Slot 116 is reserved */
944 + /* Slot 117 is reserved */
945 + /* Slot 118 is reserved */
946 +@@ -830,8 +819,7 @@ TIFFTCLAPI const TifftclStubs *tifftclStubsPtr;
947 + (tifftclStubsPtr->_TIFFSwab64BitDataPtr) /* 132 */
948 + #define TIFFFlushData1 \
949 + (tifftclStubsPtr->tIFFFlushData1) /* 133 */
950 +-#define TIFFFreeDirectory \
951 +- (tifftclStubsPtr->tIFFFreeDirectory) /* 134 */
952 ++/* Slot 134 is reserved */
953 + #define TIFFDefaultDirectory \
954 + (tifftclStubsPtr->tIFFDefaultDirectory) /* 135 */
955 + #define TIFFSetCompressionScheme \
956 +@@ -888,6 +876,8 @@ TIFFTCLAPI const TifftclStubs *tifftclStubsPtr;
957 + (tifftclStubsPtr->tIFFInitPixarLog) /* 161 */
958 + #define TIFFInitSGILog \
959 + (tifftclStubsPtr->tIFFInitSGILog) /* 162 */
960 ++#define TIFFInitLZMA \
961 ++ (tifftclStubsPtr->tIFFInitLZMA) /* 163 */
962 +
963 + #endif /* defined(USE_TIFFTCL_STUBS) */
964 +
965 +diff --git a/libtiff/tifftclStubInit.c b/libtiff/tifftclStubInit.c
966 +index cf9448f..37d9916 100644
967 +--- a/libtiff/tifftclStubInit.c
968 ++++ b/libtiff/tifftclStubInit.c
969 +@@ -70,7 +70,7 @@ const TifftclStubs tifftclStubs = {
970 + TIFFSetField, /* 47 */
971 + TIFFVSetField, /* 48 */
972 + TIFFWriteDirectory, /* 49 */
973 +- TIFFReassignTagToIgnore, /* 50 */
974 ++ 0, /* 50 */
975 + TIFFPrintDirectory, /* 51 */
976 + TIFFReadScanline, /* 52 */
977 + TIFFWriteScanline, /* 53 */
978 +@@ -120,7 +120,7 @@ const TifftclStubs tifftclStubs = {
979 + 0, /* 97 */
980 + 0, /* 98 */
981 + 0, /* 99 */
982 +- TIFFPredictorInit, /* 100 */
983 ++ 0, /* 100 */
984 + 0, /* 101 */
985 + 0, /* 102 */
986 + 0, /* 103 */
987 +@@ -130,12 +130,12 @@ const TifftclStubs tifftclStubs = {
988 + 0, /* 107 */
989 + 0, /* 108 */
990 + 0, /* 109 */
991 +- _TIFFSetupFieldInfo, /* 110 */
992 +- _TIFFMergeFieldInfo, /* 111 */
993 ++ 0, /* 110 */
994 ++ 0, /* 111 */
995 + _TIFFPrintFieldInfo, /* 112 */
996 +- TIFFFindFieldInfo, /* 113 */
997 ++ 0, /* 113 */
998 + TIFFFieldWithTag, /* 114 */
999 +- _TIFFSampleToTagType, /* 115 */
1000 ++ 0, /* 115 */
1001 + 0, /* 116 */
1002 + 0, /* 117 */
1003 + 0, /* 118 */
1004 +@@ -154,7 +154,7 @@ const TifftclStubs tifftclStubs = {
1005 + _TIFFSwab32BitData, /* 131 */
1006 + _TIFFSwab64BitData, /* 132 */
1007 + TIFFFlushData1, /* 133 */
1008 +- TIFFFreeDirectory, /* 134 */
1009 ++ 0, /* 134 */
1010 + TIFFDefaultDirectory, /* 135 */
1011 + TIFFSetCompressionScheme, /* 136 */
1012 + _TIFFSetDefaultCompressionState, /* 137 */
1013 +@@ -239,6 +239,12 @@ const TifftclStubs tifftclStubs = {
1014 + #else /* !LOGLUV_SUPPORT */
1015 + TIFFInitSGILog, /* 162 */
1016 + #endif /* !LOGLUV_SUPPORT */
1017 ++#if !defined(LZMA_SUPPORT)
1018 ++ 0, /* 163 */
1019 ++#else
1020 ++ TIFFInitLZMA, /* 163 */
1021 ++#endif /* !LZMA_SUPPORT */
1022 ++
1023 + };
1024 +
1025 + /* !END!: Do not edit above this line. */
1026 +diff --git a/tiff/configure.in b/tiff/configure.in
1027 +index 81851fa..524588d 100755
1028 +--- a/tiff/configure.in
1029 ++++ b/tiff/configure.in
1030 +@@ -74,7 +74,7 @@
1031 + # and PKG_TCL_SOURCES.
1032 + #-----------------------------------------------------------------------
1033 +
1034 +-TEA_ADD_SOURCES([tiff.c tiffJpeg.c tiffZip.c tiffPixar.c])
1035 ++TEA_ADD_SOURCES([tiff.c])
1036 + TEA_ADD_HEADERS([])
1037 + TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${srcdir}`\"])
1038 + TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\"])
1039 +diff --git a/tiff/tiff.c b/tiff/tiff.c
1040 +index 78dd3b2..8bd5ec7 100644
1041 +--- a/tiff/tiff.c
1042 ++++ b/tiff/tiff.c
1043 +@@ -115,8 +115,8 @@ SetupTiffLibrary (interp)
1044 + if (!initialized) {
1045 + initialized = 1;
1046 + if (
1047 +- TIFFRegisterCODEC && TIFFError && TIFFPredictorInit &&
1048 +- _TIFFMergeFieldInfo && TIFFFlushData1 && _TIFFNoPostDecode &&
1049 ++ TIFFRegisterCODEC && TIFFError &&
1050 ++ TIFFFlushData1 && _TIFFNoPostDecode &&
1051 + TIFFTileRowSize && TIFFScanlineSize && _TIFFsetByteArray &&
1052 + TIFFVSetField && TIFFSwabArrayOfShort
1053 + ) {
1054 +@@ -124,14 +124,14 @@ SetupTiffLibrary (interp)
1055 + if (Zlibtcl_InitStubs(interp, ZLIBTCL_VERSION, 0) == NULL) {
1056 + return TCL_ERROR;
1057 + }
1058 +- TIFFRegisterCODEC (COMPRESSION_DEFLATE, "Deflate", TkimgTIFFInitZip);
1059 +- TIFFRegisterCODEC (COMPRESSION_ADOBE_DEFLATE, "AdobeDeflate", TkimgTIFFInitZip);
1060 ++ TIFFRegisterCODEC (COMPRESSION_DEFLATE, "Deflate", TIFFInitZIP);
1061 ++ TIFFRegisterCODEC (COMPRESSION_ADOBE_DEFLATE, "AdobeDeflate", TIFFInitZIP);
1062 +
1063 + if (Jpegtcl_InitStubs(interp, JPEGTCL_VERSION, 0) == NULL) {
1064 + return TCL_ERROR;
1065 + }
1066 +- TIFFRegisterCODEC (COMPRESSION_JPEG, "JPEG", TkimgTIFFInitJpeg);
1067 +- TIFFRegisterCODEC (COMPRESSION_PIXARLOG, "PixarLog", TkimgTIFFInitPixar);
1068 ++ TIFFRegisterCODEC (COMPRESSION_JPEG, "JPEG", TIFFInitJPEG);
1069 ++ TIFFRegisterCODEC (COMPRESSION_PIXARLOG, "PixarLog", TIFFInitPixarLog);
1070 + }
1071 + }
1072 + return TCL_OK;
1073
1074 diff --git a/dev-tcltk/tkimg/files/tkimg-1.4.7-zlib.patch b/dev-tcltk/tkimg/files/tkimg-1.4.7-zlib.patch
1075 new file mode 100644
1076 index 00000000000..3d4845835ff
1077 --- /dev/null
1078 +++ b/dev-tcltk/tkimg/files/tkimg-1.4.7-zlib.patch
1079 @@ -0,0 +1,90 @@
1080 + zlib/Makefile.in | 2 +-
1081 + zlib/configure.in | 5 --
1082 + zlib/zlibtcl.decls | 2 +-
1083 + zlib/zlibtclDecls.h | 10 +--
1084 + 5 files changed, 8 insertions(+), 184 deletions(-)
1085 +
1086 +diff --git a/zlib/Makefile.in b/zlib/Makefile.in
1087 +index e70ec66..c8bf0f3 100644
1088 +--- a/zlib/Makefile.in
1089 ++++ b/zlib/Makefile.in
1090 +@@ -107,7 +107,7 @@ RANLIB = @RANLIB@
1091 + RANLIB_STUB = @RANLIB_STUB@
1092 + SHLIB_CFLAGS = @SHLIB_CFLAGS@
1093 + SHLIB_LD = @SHLIB_LD@
1094 +-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
1095 ++SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ -lz
1096 + STLIB_LD = @STLIB_LD@
1097 + TCL_DEFS = @TCL_DEFS@
1098 + TCL_BIN_DIR = @TCL_BIN_DIR@
1099 +diff --git a/zlib/configure.in b/zlib/configure.in
1100 +index 6b1e310..f51befa 100644
1101 +--- a/zlib/configure.in
1102 ++++ b/zlib/configure.in
1103 +@@ -51,11 +51,6 @@ TEA_SETUP_COMPILER
1104 + #-----------------------------------------------------------------------
1105 +
1106 + TEA_ADD_SOURCES([zlibtcl.c zlibtclStubInit.c])
1107 +-TEA_ADD_SOURCES([../compat/zlib/adler32.c ../compat/zlib/compress.c ../compat/zlib/crc32.c])
1108 +-TEA_ADD_SOURCES([../compat/zlib/deflate.c ../compat/zlib/gzclose.c ../compat/zlib/gzlib.c])
1109 +-TEA_ADD_SOURCES([../compat/zlib/gzread.c ../compat/zlib/gzwrite.c ../compat/zlib/infback.c])
1110 +-TEA_ADD_SOURCES([../compat/zlib/inffast.c ../compat/zlib/inflate.c ../compat/zlib/inftrees.c])
1111 +-TEA_ADD_SOURCES([../compat/zlib/trees.c ../compat/zlib/uncompr.c ../compat/zlib/zutil.c])
1112 +
1113 + TEA_ADD_HEADERS([zlibtcl.h zlibtclDecls.h])
1114 +
1115 +diff --git a/zlib/zlibtcl.decls b/zlib/zlibtcl.decls
1116 +index c4bf22e..b9fb804 100644
1117 +--- a/zlib/zlibtcl.decls
1118 ++++ b/zlib/zlibtcl.decls
1119 +@@ -138,7 +138,7 @@ declare 38 {
1120 + int gzputc(gzFile file, int c)
1121 + }
1122 + declare 39 {
1123 +- int gzgetc(gzFile file)
1124 ++ int gzgetc_(gzFile file)
1125 + }
1126 + declare 40 {
1127 + int gzflush(gzFile file, int flush)
1128 +diff --git a/zlib/zlibtclDecls.h b/zlib/zlibtclDecls.h
1129 +index 2f7ecb2..6393821 100644
1130 +--- a/zlib/zlibtclDecls.h
1131 ++++ b/zlib/zlibtclDecls.h
1132 +@@ -28,7 +28,7 @@
1133 + EXTERN int Zlibtcl_Init(Tcl_Interp *interp);
1134 + EXTERN int Zlibtcl_SafeInit(Tcl_Interp *interp);
1135 +
1136 +-#include "../compat/zlib/zlib.h"
1137 ++#include "@GENTOO_PORTAGE_EPREFIX@/usr/include/zlib.h"
1138 +
1139 + /* !BEGIN!: Do not edit below this line. */
1140 +
1141 +@@ -120,7 +120,7 @@ ZEXTERN char * gzgets(gzFile file, char *buf, int len);
1142 + /* 38 */
1143 + ZEXTERN int gzputc(gzFile file, int c);
1144 + /* 39 */
1145 +-ZEXTERN int gzgetc(gzFile file);
1146 ++ZEXTERN int gzgetc_(gzFile file);
1147 + /* 40 */
1148 + ZEXTERN int gzflush(gzFile file, int flush);
1149 + /* 41 */
1150 +@@ -179,7 +179,7 @@ typedef struct ZlibtclStubs {
1151 + int (*gzputsPtr) (gzFile file, const char *s); /* 36 */
1152 + char * (*gzgetsPtr) (gzFile file, char *buf, int len); /* 37 */
1153 + int (*gzputcPtr) (gzFile file, int c); /* 38 */
1154 +- int (*gzgetcPtr) (gzFile file); /* 39 */
1155 ++ int (*gzgetc_Ptr) (gzFile file); /* 39 */
1156 + int (*gzflushPtr) (gzFile file, int flush); /* 40 */
1157 + z_off_t (*gzseekPtr) (gzFile file, z_off_t offset, int whence); /* 41 */
1158 + int (*gzrewindPtr) (gzFile file); /* 42 */
1159 +@@ -273,8 +273,8 @@ ZEXTERN const ZlibtclStubs *zlibtclStubsPtr;
1160 + (zlibtclStubsPtr->gzgetsPtr) /* 37 */
1161 + #define gzputc \
1162 + (zlibtclStubsPtr->gzputcPtr) /* 38 */
1163 +-#define gzgetc \
1164 +- (zlibtclStubsPtr->gzgetcPtr) /* 39 */
1165 ++#define gzgetc_ \
1166 ++ (zlibtclStubsPtr->gzgetc_Ptr) /* 39 */
1167 + #define gzflush \
1168 + (zlibtclStubsPtr->gzflushPtr) /* 40 */
1169 + #define gzseek \
1170
1171 diff --git a/dev-tcltk/tkimg/tkimg-1.4.7.ebuild b/dev-tcltk/tkimg/tkimg-1.4.7.ebuild
1172 new file mode 100644
1173 index 00000000000..0798c06517d
1174 --- /dev/null
1175 +++ b/dev-tcltk/tkimg/tkimg-1.4.7.ebuild
1176 @@ -0,0 +1,88 @@
1177 +# Copyright 1999-2018 Gentoo Foundation
1178 +# Distributed under the terms of the GNU General Public License v2
1179 +
1180 +EAPI=6
1181 +
1182 +inherit autotools eutils multilib prefix toolchain-funcs virtualx
1183 +
1184 +MYP=Img-Source-$PV
1185 +
1186 +DESCRIPTION="Adds a lot of image formats to Tcl/Tk"
1187 +HOMEPAGE="http://tkimg.sourceforge.net/"
1188 +SRC_URI="mirror://sourceforge/${PN}/${PN}/1.4/${PN}%20${PV}/${MYP}.tar.gz"
1189 +
1190 +SLOT="0"
1191 +LICENSE="BSD"
1192 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
1193 +IUSE="doc test static-libs"
1194 +
1195 +RDEPEND="
1196 + dev-lang/tk:=
1197 + >=dev-tcltk/tcllib-1.11
1198 + media-libs/tiff:0=
1199 + >=media-libs/libpng-1.6:0=
1200 + >=sys-libs/zlib-1.2.7:=
1201 + x11-libs/libX11
1202 + virtual/jpeg:="
1203 +DEPEND="${RDEPEND}
1204 + test? (
1205 + x11-apps/xhost
1206 + media-fonts/font-misc-misc
1207 + media-fonts/font-cursor-misc )"
1208 +
1209 +# Fails tests
1210 +RESTRICT="test"
1211 +
1212 +S="${WORKDIR}/${MYP}"
1213 +
1214 +PATCHES=(
1215 + "${FILESDIR}"/${P}-tclconfig.patch
1216 + "${FILESDIR}"/${P}-jpeg.patch
1217 + "${FILESDIR}"/${P}-zlib.patch
1218 + "${FILESDIR}"/${P}-png.patch
1219 + "${FILESDIR}"/${P}-tiff.patch
1220 + "${FILESDIR}"/${P}-jpeg-9.patch
1221 +)
1222 +
1223 +src_prepare() {
1224 + default
1225 + find . -name configure -delete
1226 + eautoreconf
1227 + for dir in zlib libpng libtiff libjpeg base bmp gif ico jpeg pcx pixmap png\
1228 + ppm ps sgi sun tga tiff window xbm xpm dted raw ; do
1229 + (cd $dir; eautoreconf)
1230 + done
1231 +
1232 + find compat/{libjpeg,libpng,zlib,libtiff} -delete
1233 +
1234 + eprefixify */*.h
1235 + tc-export AR
1236 +}
1237 +
1238 +src_install() {
1239 + local l bl
1240 +
1241 + emake \
1242 + DESTDIR="${D}" \
1243 + INSTALL_ROOT="${D}" \
1244 + install
1245 +
1246 + if ! use static-libs; then
1247 + find "${ED}"/usr/$(get_libdir)/ -type f -name "*\.a" -delete || die
1248 + fi
1249 +
1250 + # Make library links
1251 + for l in "${ED}"/usr/lib*/Img*/*tcl*.so; do
1252 + bl=$(basename $l)
1253 + dosym Img1.4/${bl} /usr/$(get_libdir)/${bl}
1254 + done
1255 +
1256 + dodoc ChangeLog README Reorganization.Notes.txt changes ANNOUNCE
1257 +
1258 + if use doc; then
1259 + insinto /usr/share/doc/${PF}
1260 + doins demo.tcl
1261 + insinto /usr/share/doc/${PF}/html
1262 + doins -r doc/*
1263 + fi
1264 +}