tif_win32.c: use SetFilePointer instead of SetFilePointerEx
This commit is contained in:
parent
0907a08768
commit
2085534654
@ -1,3 +1,10 @@
|
||||
2007-08-10 Joris Van Damme <joris.at.lebbeke@skynet.be>
|
||||
|
||||
* libtiff/tif_win32.c: use SetFilePointer instead of
|
||||
SetFilePointerEx, as per bug
|
||||
|
||||
http://bugzilla.remotesensing.org/show_bug.cgi?id=1580
|
||||
|
||||
2007-07-19 Andrey Kiselev <dron@ak4719.spb.edu>
|
||||
|
||||
* libtiff/tif_stream.cxx: Put all callback functions declarations
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_win32.c,v 1.31 2007-07-11 15:52:48 joris Exp $ */
|
||||
/* $Id: tif_win32.c,v 1.32 2007-08-10 10:04:50 joris Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -95,9 +95,9 @@ _tiffWriteProc(thandle_t fd, void* buf, tmsize_t size)
|
||||
static uint64
|
||||
_tiffSeekProc(thandle_t fd, uint64 off, int whence)
|
||||
{
|
||||
LARGE_INTEGER off_in, off_out;
|
||||
LARGE_INTEGER offli;
|
||||
DWORD dwMoveMethod;
|
||||
off_in.QuadPart = off;
|
||||
offli.QuadPart = off;
|
||||
switch(whence)
|
||||
{
|
||||
case SEEK_SET:
|
||||
@ -113,9 +113,10 @@ _tiffSeekProc(thandle_t fd, uint64 off, int whence)
|
||||
dwMoveMethod = FILE_BEGIN;
|
||||
break;
|
||||
}
|
||||
if (SetFilePointerEx(fd,off_in,&off_out,dwMoveMethod)==0)
|
||||
off_out.QuadPart=0;
|
||||
return(off_out.QuadPart);
|
||||
offli.LowPart=SetFilePointer(fd,offli.LowPart,&offli.HighPart,dwMoveMethod);
|
||||
if ((offli.LowPart==INVALID_SET_FILE_POINTER)&&(GetLastError()!=NO_ERROR))
|
||||
offli.QuadPart=0;
|
||||
return(offli.QuadPart);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user