pkgsrc/graphics/tiff/patches/patch-ag
abs 7fd6f3acb3 Add back previous patch to libtiff/tif_fax3.c lost in last commit.
Flagged by wizd :) - many thanks.
Note to self: Running patch on a file twice does tend to make the .orig file
less than useful for comparing to the original state...
2004-03-22 17:03:30 +00:00

32 lines
1.3 KiB
Text

$NetBSD: patch-ag,v 1.6 2004/03/22 17:03:30 abs Exp $
--- libtiff/tif_fax3.c.orig Thu Nov 6 08:22:13 2003
+++ libtiff/tif_fax3.c
@@ -309,7 +309,7 @@ Fax3Decode2D(TIFF* tif, tidata_t buf, ts
* this is <8 bytes. We optimize the code here to reflect the
* machine characteristics.
*/
-#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__) || defined(__arch64__)
+#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__) || defined(__arch64__) || defined(_LP64)
#define FILL(n, cp) \
switch (n) { \
case 15:(cp)[14] = 0xff; case 14:(cp)[13] = 0xff; case 13: (cp)[12] = 0xff;\
@@ -451,7 +451,7 @@ Fax3SetupState(TIFF* tif)
Fax3BaseState* sp = Fax3State(tif);
long rowbytes, rowpixels;
int needsRefLine;
- Fax3CodecState* dsp = DecoderState(tif);
+ Fax3CodecState* dsp = (Fax3CodecState*) Fax3State(tif);
uint32 nruns;
if (td->td_bitspersample != 1) {
@@ -1284,7 +1284,8 @@ InitCCITTFax3(TIFF* tif)
sp->recvparams = 0;
sp->subaddress = NULL;
- tif->tif_flags |= TIFF_NOBITREV; /* decoder does bit reversal */
+ if (sp->rw_mode == O_RDONLY) /* FIXME: improve for in place update */
+ tif->tif_flags |= TIFF_NOBITREV; /* decoder does bit reversal */
DecoderState(tif)->runs = NULL;
TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, _TIFFFax3fillruns);
EncoderState(tif)->refline = NULL;