diff options
author | bfriesen <bfriesen> | 2015-08-23 17:49:01 +0000 |
---|---|---|
committer | bfriesen <bfriesen> | 2015-08-23 17:49:01 +0000 |
commit | 2a1af3f89ca5e2bb4e097e3a77ffd503847f36fb (patch) | |
tree | 06bc7802fe47f648c1c998a4ba1add8e68638912 | |
parent | 824e798509af940ee3fd36f9176354ad9e0e3671 (diff) | |
download | libtiff-2a1af3f89ca5e2bb4e097e3a77ffd503847f36fb.tar.gz |
For MinGW builds, make sure required CRT is available in order to enable large file support.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | libtiff/tiffiop.h | 11 |
2 files changed, 12 insertions, 3 deletions
@@ -1,5 +1,9 @@ 2015-08-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us> + * libtiff/tiffiop.h: For MinGW comiles, make sure that build + supports necessary __MSVCRT_VERSION__ (at least at least 0x800). + Otherwise large files can not be supported for POSIX-style I/O. + * tools/fax2tiff.c (main): Eliminate a compiler warning in 64-bit builds about cast to thandle_t. diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h index 9ad30fc6..ca95d750 100644 --- a/libtiff/tiffiop.h +++ b/libtiff/tiffiop.h @@ -1,4 +1,4 @@ -/* $Id: tiffiop.h,v 1.86 2015-08-19 02:31:04 bfriesen Exp $ */ +/* $Id: tiffiop.h,v 1.87 2015-08-23 17:49:01 bfriesen Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -276,6 +276,11 @@ struct tiff { 'off_t' rather than 'long'. It is wrong to use fseeko() and ftello() only on systems with special LFS support since some systems (e.g. FreeBSD) support a 64-bit off_t by default. + + For MinGW, __MSVCRT_VERSION__ must be at least 0x800 to expose these + interfaces. The MinGW compiler must support the requested version. MinGW + does not distribute the CRT (it is supplied by Microsoft) so the correct CRT + must be available on the target computer in order for the program to run. */ #if defined(HAVE_FSEEKO) # define fseek(stream,offset,whence) fseeko(stream,offset,whence) @@ -283,8 +288,8 @@ struct tiff { #endif #endif #if defined(__WIN32__) && \ - !(defined(_MSC_VER) && _MSC_VER < 1400)/* && \ */ - /* !(defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x800) */ + !(defined(_MSC_VER) && _MSC_VER < 1400) && \ + !(defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x800) typedef unsigned int TIFFIOSize_t; #define _TIFF_lseek_f(fildes,offset,whence) _lseeki64(fildes,/* __int64 */ offset,whence) /* #define _TIFF_tell_f(fildes) /\* __int64 *\/ _telli64(fildes) */ |