[gdal-dev] Large Raw Files
Frank Warmerdam
warmerdam at p...
Fri Dec 14 12:31:14 EST 2001
ldjohn at u... wrote:
> o frmts/raw/rawdataset.cpp
> 184c184
> < if( Seek( nImgOffset + iLine * nLineOffset, SEEK_SET ) == -1
> ---
> > if( Seek( nImgOffset + (vsi_l_offset) iLine * nLineOffset,
> SEEK_SET ) == -1
> 292c292,293
> < if( Seek( nImgOffset + nBlockYOff * nLineOffset, SEEK_SET ) == -1 )
> ---
> > if( Seek( nImgOffset + (vsi_l_offset) nBlockYOff * nLineOffset,
> > SEEK_SET ) == -1 )
>
> It seems that the IRIX MIPSPro compiler used in the first test on IRIX
> may handle the automatic datatype conversion differently than GCC. The
> nBlockYOff * nLineOffset result overflowed without the typecast.
Lowell,
Please apply the above change in CVS.
> o port/cpl_vsil_unix_stdio_64.cpp
> 76c76
> < return( fseek64( fp, nOffset, nWhence ) );
> ---
> > return( fseeko64( fp, nOffset, nWhence ) );
> 86c86
> < return( ftell64( fp ) );
> ---
> > return( ftello64( fp ) );
>
> The long file position offset functions fseek64 and ftell64 do not
> exist on our Solaris 2.7 system. That may well be due to outdated
> include files. That system is not a primary development system, but
> acts as our Sun test platform. The "o" versions of the calls are what
> we use in LAS for large file support.
>
> I also had to override the configure test for large file support using
> "--with-unix-stdio-64" since the test looks for fseek64 in stdio.h.
>
> So I'm not sure whether this impacts other users or if it something
> that we need to deal with locally.
I will try to make a few changes in the configure test and in
cpl_vsil_unix_stdio_64.cpp to handle this case. I will let you know when
it is available so you can retest it.
I believe solaris 2.8 has the newer definitions.
Best regards,
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list