| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2008.08.11 20:51 "Re: windows 64 bit build", by Bob FriesenhahnOn Mon, 11 Aug 2008, Mikhail Kruk wrote:
> OK... what would be a good way of fixing it? Doesn't look like
> TIFFFdOpen interface should be changed; I'm not sure why is it used to
> pass Windows HANDLEs, sounds confusing (as Windows has normal int file
> descriptors as well). Should we add new functions TIFFHndlOpen or
> something like that? Win32 only?
In the Windows build, I see that thandle_t is a Windows HANDLE type.
TIFFFdOpen accepts 'int ifd' and then casts it into the thandle_t for
use in TIFFClientOpen. It also caches the 'int' sized value as
tif->tif_fd:
struct tiff {
char* tif_name; /* name of open file */
int tif_fd; /* open file descriptor */
Unfortunately, struct tiff is part of the public interface so changing
it impacts the ABI. A potential solution is to change the type used
to pass and store file descriptors so that under Windows, it is always
large enough to store a void*.
Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
|
|||||||