From ab3f534166ca4cead544d209d3a70ff347a5548e Mon Sep 17 00:00:00 2001 From: bfriesen Date: Sun, 29 Oct 2017 18:28:43 +0000 Subject: fax2tiff: Pass the FAX_Client_Data struct as client data --- ChangeLog | 8 ++++++++ Makefile.in | 5 ++--- build/Makefile.in | 1 - configure | 24 ++++++------------------ contrib/Makefile.in | 1 - contrib/addtiffo/Makefile.in | 1 - contrib/dbs/Makefile.in | 1 - contrib/dbs/xtiff/Makefile.in | 1 - contrib/iptcutil/Makefile.in | 1 - contrib/mfs/Makefile.in | 1 - contrib/pds/Makefile.in | 1 - contrib/ras/Makefile.in | 1 - contrib/stream/Makefile.in | 1 - contrib/tags/Makefile.in | 1 - contrib/win_dib/Makefile.in | 1 - html/Makefile.in | 1 - html/images/Makefile.in | 1 - html/man/Makefile.in | 1 - libtiff/Makefile.in | 1 - man/Makefile.in | 1 - port/Makefile.in | 1 - test/Makefile.in | 1 - tools/Makefile.in | 1 - tools/fax2tiff.c | 5 ++--- 24 files changed, 18 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 797b2317..eafbdb85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-10-29 Bob Friesenhahn + + * tools/fax2tiff.c (_FAX_Client_Data): Pass FAX_Client_Data as the + client data. This client data is not used at all at the moment, + but it makes the most sense. Issue that the value of + client_data.fd was passed where a pointer is expected was reported + via email by Gerald Schade on Sun, 29 Oct 2017. + 2017-10-23 Even Rouault * libtiff/tif_getimage.c: avoid floating point division by zero in diff --git a/Makefile.in b/Makefile.in index 80d38218..c9c0645f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -222,8 +222,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libtiff-4.pc.in \ $(top_srcdir)/config/missing \ $(top_srcdir)/config/mkinstalldirs ChangeLog README TODO \ config/compile config/config.guess config/config.sub \ - config/install-sh config/ltmain.sh config/missing \ - config/mkinstalldirs + config/depcomp config/install-sh config/ltmain.sh \ + config/missing config/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -405,7 +405,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/build/Makefile.in b/build/Makefile.in index 7df7b722..69d54d1f 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -349,7 +349,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/configure b/configure index e37ba3b3..e39d769e 100755 --- a/configure +++ b/configure @@ -782,7 +782,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -907,7 +906,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1160,15 +1158,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1306,7 +1295,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1459,7 +1448,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -18397,7 +18385,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -18443,7 +18431,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -18467,7 +18455,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -18512,7 +18500,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -18536,7 +18524,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; diff --git a/contrib/Makefile.in b/contrib/Makefile.in index f5a1c098..1d1d0293 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -348,7 +348,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/addtiffo/Makefile.in b/contrib/addtiffo/Makefile.in index ece4f6fa..24c604e1 100644 --- a/contrib/addtiffo/Makefile.in +++ b/contrib/addtiffo/Makefile.in @@ -339,7 +339,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/dbs/Makefile.in b/contrib/dbs/Makefile.in index 88745546..e3503e10 100644 --- a/contrib/dbs/Makefile.in +++ b/contrib/dbs/Makefile.in @@ -392,7 +392,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/dbs/xtiff/Makefile.in b/contrib/dbs/xtiff/Makefile.in index 062ea695..08993c44 100644 --- a/contrib/dbs/xtiff/Makefile.in +++ b/contrib/dbs/xtiff/Makefile.in @@ -291,7 +291,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/iptcutil/Makefile.in b/contrib/iptcutil/Makefile.in index f5ff763e..0ee5ad3c 100644 --- a/contrib/iptcutil/Makefile.in +++ b/contrib/iptcutil/Makefile.in @@ -338,7 +338,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/mfs/Makefile.in b/contrib/mfs/Makefile.in index 0d8121ea..0a3b8406 100644 --- a/contrib/mfs/Makefile.in +++ b/contrib/mfs/Makefile.in @@ -288,7 +288,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/pds/Makefile.in b/contrib/pds/Makefile.in index 114f66fa..29e48aa3 100644 --- a/contrib/pds/Makefile.in +++ b/contrib/pds/Makefile.in @@ -288,7 +288,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/ras/Makefile.in b/contrib/ras/Makefile.in index 5bc03cbb..67075acb 100644 --- a/contrib/ras/Makefile.in +++ b/contrib/ras/Makefile.in @@ -288,7 +288,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/stream/Makefile.in b/contrib/stream/Makefile.in index 7a5886a6..a7e314ce 100644 --- a/contrib/stream/Makefile.in +++ b/contrib/stream/Makefile.in @@ -288,7 +288,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/tags/Makefile.in b/contrib/tags/Makefile.in index e02a89ea..ec8302c6 100644 --- a/contrib/tags/Makefile.in +++ b/contrib/tags/Makefile.in @@ -288,7 +288,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/contrib/win_dib/Makefile.in b/contrib/win_dib/Makefile.in index 522b2c74..47805786 100644 --- a/contrib/win_dib/Makefile.in +++ b/contrib/win_dib/Makefile.in @@ -288,7 +288,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/html/Makefile.in b/html/Makefile.in index 760e5a18..82467b8f 100644 --- a/html/Makefile.in +++ b/html/Makefile.in @@ -380,7 +380,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/html/images/Makefile.in b/html/images/Makefile.in index 2cdec5ed..80b74bfe 100644 --- a/html/images/Makefile.in +++ b/html/images/Makefile.in @@ -319,7 +319,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/html/man/Makefile.in b/html/man/Makefile.in index e006ccb1..eb99fd1b 100644 --- a/html/man/Makefile.in +++ b/html/man/Makefile.in @@ -319,7 +319,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/libtiff/Makefile.in b/libtiff/Makefile.in index 3d2f7a33..62fb7bc8 100644 --- a/libtiff/Makefile.in +++ b/libtiff/Makefile.in @@ -440,7 +440,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/man/Makefile.in b/man/Makefile.in index 9bffa229..212905b6 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -320,7 +320,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/port/Makefile.in b/port/Makefile.in index e1f757e3..55e09e6e 100644 --- a/port/Makefile.in +++ b/port/Makefile.in @@ -338,7 +338,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/test/Makefile.in b/test/Makefile.in index 266717f5..644a75a5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -620,7 +620,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/tools/Makefile.in b/tools/Makefile.in index d7b214d4..d7d56040 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -427,7 +427,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/tools/fax2tiff.c b/tools/fax2tiff.c index d43c2dca..f23374e0 100644 --- a/tools/fax2tiff.c +++ b/tools/fax2tiff.c @@ -1,4 +1,4 @@ -/* $Id: fax2tiff.c,v 1.27 2017-04-27 19:50:01 erouault Exp $ */ +/* $Id: fax2tiff.c,v 1.28 2017-10-29 18:28:45 bfriesen Exp $ */ /* * Copyright (c) 1990-1997 Sam Leffler @@ -283,11 +283,10 @@ main(int argc, char* argv[]) } #if defined(_WIN32) && defined(USE_WIN32_FILEIO) client_data.fh = _get_osfhandle(fileno(in)); - TIFFSetClientdata(faxTIFF, (thandle_t) client_data.fh); #else client_data.fd = fileno(in); - TIFFSetClientdata(faxTIFF, (thandle_t) client_data.fd); #endif + TIFFSetClientdata(faxTIFF, (thandle_t) &client_data); TIFFSetFileName(faxTIFF, (const char*)argv[optind]); TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize); TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1); -- cgit v1.2.1